Commit Graph

1095 Commits

Author SHA1 Message Date
Benjamin Lamowski
b05b7f17f3 sculpt_manager: bump editor default quota for large fonts and 4k
When trying to open a file in the Files view with font size set to
Large on 4k screens, the editor's / `text_area`'s `view` child fails to
bump its RAM quota when the editor's default quota is too small.

To mitigate the issue, bump the editor's default quota to 80MiB.
The long-term fix would be for the editor to request more RAM from the
runtime to satisfy the `view` RAM request.

Issue #5356
Issue #5383
2024-11-20 08:58:39 +01:00
Benjamin Lamowski
f6a1956a30 sculpt_manager: bump quota boost limit for runtime_view
When using the Files view with font size set to Large, the boosted
runtime_view limit of 64MiB is still not enough for 4k screens.

Double the RAM boost limit to 128MiB.

Issue #5356
2024-11-20 08:58:39 +01:00
Josef Söntgen
59d951ed6a sculpt_manager: start fb on second CPU on Pocket
With this commit the fb driver is started on the second CPU on the
MNT Pocket Reform to decouple it from the other components started
on the first CPU during the system's boot-up and mitigates bring-up
issues with this driver that result in an often non-working display.

Issue #5378.
2024-11-20 08:58:39 +01:00
Josef Söntgen
fe008e0884 sculpt_manager: allow decoupling fb from first cpu
This commit allows for expressing the intent to start the fb driver
on a different CPU.

Issue #5378.
2024-11-20 08:58:39 +01:00
Josef Söntgen
f72fdf77ed sculpt_manager: set affinity for child
With this commit it is possible to specify the affinity for components
directly managed by Sculpt, like drivers.
2024-11-20 08:58:39 +01:00
Josef Söntgen
0f70cbd704 sculpt_manager: query affinity-space immediately 2024-11-20 08:58:39 +01:00
Norman Feske
dffa32a72c menu_view: don't skip frames after idle
When updating a dialog after a prolonged idle time with no active
animatons, the next _handle_gui_sync would wrongly fast-forward
animations for all the frames passed since the last _handle_gui_sync. On
the PinePhone, this effect is clearly visible when switching between the
main section. The GUI jumps from one state to another instead of
transitioning. This patch solves the issue be resetting '_previous_sync'
when waking up from idle.

Related to issue #5347
2024-11-07 16:11:10 +01:00
Norman Feske
fdd2b4edb0 sculpt: restart depot_rom on use/unuse
Large deployments (e.g., using the Falkon browser) can significantly
inflate the RAM quota of depot_rom. When switching the Sculpt storage
target (using the "Use" buttons), depot_rom is restarted. Right now,
however, it retains its (inflated) quota. It is better to reset the
quota to its initial value to free up RAM that thereby becomes usable
for a different deployment. Otherwise, the depot_rom's resources can be
deflated only by rebooting.
2024-11-05 12:03:17 +01:00
Norman Feske
324245d029 sculpt: restrict un-merging of fb connectors
In setups with 3 or more displays, allow the un-merging of connectors
only for the last mirrored connector. Otherwise, the operation would
implicitely change the order of connectors because the new discrete
connector needs appear after all merged connectors.

Issue #5286
2024-10-30 08:14:56 +01:00
Josef Söntgen
2d3170124d phone_manager: ignore AP list hovered temporarily
The access-point-list hovered state prevents preseting the available
scan results, which currently can happen unintentionally. This commit
hot-wires the hover handling and thus will always show and update the
list.  New scan results are received every few seconds and it could
happen that the list changes while the user selects a network (that's
what the original implementation guards against).

Issue #5369.
2024-10-30 08:14:56 +01:00
Norman Feske
baedd79f62 sculpt_manager: fb unplug, sanitize conn. model
This patch explicitly handles the unplugging of displays, avoiding the
use of stale connectors for defining the panorama. It also makes the
import of the connectors model robust against intermediate states
reported by the driver (a connector reported as connector but without
any mode), and discards the use of any information of non-present
connectors as merge info.

Issue #5286
2024-10-30 08:14:56 +01:00
Norman Feske
1660dc0635 sculpt: use icons for fb swap and merge/unmerge
Issue #5286
2024-10-30 08:14:56 +01:00
Norman Feske
c9015d6076 sculpt: prevent disabling the hovered display
Issue #5370
2024-10-30 08:14:56 +01:00
Norman Feske
732f310b26 menu_view: update dialog when min w/h changes
The minimum width/height of a dialog is not specified in the dialog ROM
but in the menu_view configuration. So the regular dialog-ROM update
handling fails to captures dynamic changes of the minimum w/h. In
Sculpt, the panel would not always adjust immediately to a new screen
size.

This patch triggers a dialog update when detecting such configuration
changes (min w/h, opaqueness, background color).

Issue #5370
2024-10-30 08:14:56 +01:00
Norman Feske
9ad7111634 sculpt: let leitzentrale follow the pointer
This patch places the leitzentrale GUI always at the pointer-at display
instead of filling the entire panorama. This ensures that the complete
leitzentrale GUI is always visible.

Fixes #5370
2024-10-30 08:14:56 +01:00
Norman Feske
01c96cf537 sculpt: generate panorama config
If the fb driver is configured to use discrete displays, sculpt now
automatically generates a panorama configuration for nitpicker that
shows all displays side by side. The effective nitpicker config is
now located at config/managed/nitpicker.

The automatism takes effect only when nitpicker's <capture> node
in config/nitpicker is empty. Hence, the managed panorama can be
overridden by a manually managed panorama.

Issue #5286
2024-10-30 08:14:55 +01:00
Norman Feske
8c43f8aa33 sculpt_manager: interactive framebuffer settings
This patch add a configuration dialog in the intel_fb node of the
component graph. The dialog displays a list of present displays labeled
after their respecive connectors. A mode can be selected for each
connector when clicking on the connector entry.

In-between the entries there are two buttons. The connect button is
toggle that defines whether the two adjacent entries are mirrored.
It is enabled by default so that all new connectors participate in
the mirroring. By untoggling the last enabled connect button, the
entry below the button becomes a discrete (non-mirrored) display.

A swap button allows for changing the order of the list, which has
to effects. First, the resolution of the very first entry defines
the size for mirrored display. So be changing the order of mirrored
displays, one can pick the preferred screen size. Second, the order
of discrete displays defines the layout of the panorama from left to
right. (the panorama config is not part of this commit though)

Note that there is currently no safety net against locking oneself
out of all displays. E.g., one can make Sculpt unusable by manually
disabling each display, or by selecting modes not properly handled by
the connected monitor. In the future, we may add a confirm button with
a timeout to roll back such unfortunate settings.

Fixes #5286
2024-10-30 08:14:55 +01:00
Josef Söntgen
8d76eebf93 sculpt: add MNT Pocket Reform
Fix genodelabs/genode#5360.
2024-10-30 08:14:55 +01:00
Norman Feske
3ab9173b20 gui_session: window-closed state as attribute
With the change of "gui_session: provide mode info as XML", the
client-side window-close handling became dysfunct because the
window-close state got wrongly interpreted as initial window state, to
the effect that a client's initial-window size policy got applied
instead of closing the window.

This patch makes the inital state of running a windowed application
(when no window size is defined yet) clearly distiguishable from the
state after which the user closed the window. Prior this patch, both
conditions were reflected by an empty <capture/> node in the panorama.
Now, the latter condition is reported as <capture closed="yes"/>, which
alleviates the need to track the life cycle of a window at the client
size.

Issue #5353
2024-10-30 08:14:55 +01:00
Norman Feske
5e3b6ee08f terminal: fix tiling artifacts in shrinked window
When shriking the terminal window, the view must be shrinked before
shriking the pixel buffer. Otherwise, when the buffer becomes smaller
than the view, nitpicker fills the excess view area with tiled content
of the buffer, which looks funny.

Related to issue #5350
2024-10-30 08:14:54 +01:00
Benjamin Lamowski
6715f074ff sculpt_manager: fix quota boost limit for runtime_view
Commit 75e1f1797d increased runtime_view's initial RAM quota from 4MiB
to 52MiB, but failed to adjust the boost limit. Therefore, when
addtional RAM was requested, the limit would actually be degreased to
32MiB.

Adjust the RAM boost limit to 64MiB to make the runtime_view work on 4k
screens.

Issue #5356
2024-10-30 08:14:54 +01:00
Norman Feske
135a866ec0 sculpt_manager: avoid runtime_view cap request
This commit removes the initial dignostic message from the log. The
message is harmless because the sculpt manager upgrades the quota on
demand but its best to avoid the noise.

  child "runtime_view" requests resources: cap_quota=4

Issue #5356
2024-10-30 08:14:54 +01:00
Christian Helmuth
7961ff50a2 tiled_wm: fix dependency to util.h 2024-10-30 08:14:53 +01:00
Christian Helmuth
a0ef5b5a36 sculpt: keep runtime capture session labels
Nitpicker may use session labels for panorama configuration in capture
policies.

Issue #5352
Issue #5356
2024-10-30 08:05:33 +01:00
Josef Söntgen
bc8932e46a terminal: use initial mode for undefined size 2024-10-14 14:39:44 +02:00
Josef Söntgen
31f9d414a3
sculpt_manager: remove invalid network node
With the recent Wifi::Manager changes setting an invalid SSID will
lead to a diagnostic warning. Since disconnecting is handled by
removing the existent '<network>' there is no reason to generate
an invalid node in the first place.

Issue #5356.
2024-10-08 14:20:21 +02:00
Josef Söntgen
0b9d3c3dcc
sculpt_manager: increase wifi driver caps
This remedies the initial session upgrade on certain systems (Alder
Lake).

Issue #5356.
2024-10-08 14:20:20 +02:00
Norman Feske
ca47280ce9 wm/layouter: pointer grabbing/ungrabbing
This patch implements the following policy for applications requesting
exclusive input (relative motion): The pointer is grabbed as soon as the
user clicks inside the application window. It is forcibly ungrabbed on
any window-focus change or when tapping the KEY_SCREEN. An application
can always enable (transient) exclusive input during a key sequence,
e.g., when dragging the mouse while holding the mouse button. Transient
exclusive input is revoked when releasing the last button/key.

Fixes #5355
2024-10-08 09:09:24 +02:00
Norman Feske
996d9b300c menu_view: restore horizontal cursor positioning
This is a follow-up fix for "Make util/geometry.h C++20 friendly".

Fixes #5239
Issue #5356
2024-10-08 09:09:24 +02:00
Norman Feske
75b04b38f6 Adjust RAM and cap quotas
The recent changes of the GUI stack (proper accounting of cap and RAM
resources by the window manager and nitpicker, output buffered at the
server side) require quota adjustments at various GUI-related places.

Issue #5356
2024-10-08 09:09:24 +02:00
Norman Feske
d7830a0ce6 Add Input::Session::exclusive() interface
This interface allows a GUI client to express the intent to exclusively
observe relative motion events while locking the absolute pointer
position. This patch merely extends the interface without implementing
it.

As this change touches os/include/input/component.h, it moves the
manage/dissolve operations into the class, ensuring the call of
dissolve at destruction time.

Issue #5355
2024-10-08 09:09:24 +02:00
Norman Feske
318d641266 gui_session: provide mode info as XML
In multi-monitor scenarios, the mode is no longer a single rectangular
area but a panorama with potentially many captured rectangles. This
patch replaces the former 'mode' and 'mode_sigh' RPC by a new 'info'
ROM accessor.

Issue #5353
2024-10-08 09:09:24 +02:00
Norman Feske
e69c01aad3 framebuffer_session: add sync_source selection
The new Framebuffer::Session::sync_source RPC function allows for the
selection of a specific source of sync signals in the presence of
multiple capture clients at the GUI server.

This patch contains only the extension of the interface. The information
is not evaluated by the GUI server yet.

Issue #5347
2024-10-08 09:09:24 +02:00
Norman Feske
5b4e1915d8 framebuffer_session: accessors for buffer surfaces
This patch adds central and safe utilities for accessing the distinct
parts of the virtual framebuffer to relieve clients from pointer
calculations.

Issue #5351
2024-10-08 09:09:24 +02:00
Norman Feske
e738162bde framebuffer_session: alpha as Mode attribute
Propagate the want of an alpha channel as attribute of Framebuffer::Mode
instead of passing this property as a separate bool argument.

This clears the way for adding useful accessors for pixel/alpha/input
surfaces to the Mode type as a subsequent step.

Issue #5351
2024-10-08 09:09:23 +02:00
Norman Feske
db2f1e542c decorator: double-buffered output
This patch ensures that the displayed pixel buffer is always consistent
by applying intermediate drawing steps on an invisible back buffer,
which is blitted to the front buffer by the GUI server.

Note that the addition of the back buffer increases the decorator's RAM
demand by 4*w*h (4 bytes per pixel) whereas w and h are the screen size.

Issue #5350
2024-10-08 09:09:23 +02:00
Norman Feske
8082aa980e framebuffer_session: atomic blitting and panning
By enhancing the Framebuffer::Session interface by the new RPC functions
'blit' and 'panning', GUI clients become able to attain tearing-free
output. Two modes of operations are supported.

1. Atomic back-to-front blitting

   GUI clients that partially update their user interface like regular
   application dialogs, can now implement double buffering by placing
   both the back buffer and front buffer within the GUI session's
   framebuffer and configuring a view that shows only the front buffer.
   The 'blit' operation allows the client to atomically flush pixels
   from the back buffer to the front buffer.

2. Atomic buffer flipping

   GUI clients that always update all pixels like a media player or
   a game can now use the 'panning' feature to atomically redirect the
   displayed pixels to a different portion of the GUI session's virtual
   frame buffer. The virtual framebuffer always contains two frames,
   the displayed one and the next one. Once the next frame is complete,
   the client changes the panning position to the portion containing
   the next frame.

Issue #5350
2024-10-08 09:09:23 +02:00
Norman Feske
0e33830d1f framebuffer_session: use Rect as refresh argument
This patch replaces basic-type arguments x, y, w, h by the 'Rect' type,
and imports the Genode namespace into the Framebuffer namespace.

Issue #5350
2024-10-08 09:09:23 +02:00
Norman Feske
e69ade5299 decorator: use timer for animation timing
This patch changes the precision of the configuration's motion attribute
to a multiple of 10 ms (centi-seconds). The previous version used steps
of 20 ms. Hence, one needs to adjust existing configurations by doubling
the motion attribute values of the themed decorator.

Issue #5347
2024-10-08 09:09:23 +02:00
Norman Feske
58d20c7751 menu_view: use timer for animation timing
This patch removes the use of sync signals as time source. The animation
phase is now timed using a timer connection as tick source while sync
signals are used for scheduling the redraws.

Issue #5347
2024-10-08 09:09:23 +02:00
Norman Feske
ffcd08b5c7 backdrop,pdf_view: remove sync handling
The sync handling makes the code more complicated without a benefit.

Issue #5347
2024-10-08 09:09:22 +02:00
Josef Söntgen
6d79a44c46 sculpt_manager: adapt to Wifi::Manager changes
Issue #5341.
2024-10-08 09:09:22 +02:00
Josef Söntgen
d4e4b8bf60 driver/wifi: rework CTRL interface manager
This commit streamlines the interaction between the Wifi::Manager
and the wpa_supplicant's CTRL interface.

As user-facing changes it alters some default settings and introduces
new features:

* Every configured network now needs to explicitly have its
  'auto_connect' (to be considered an option for joining) attribute
  set to 'true' whereas this was previously the default value if the
  attribute was not set at all.

* The 'log_level' attribute is added and configures the supplicant's
  verbosity. Valid values correspond to levels used by the supplicant
  and are as follows 'excessive', 'msgdump', 'debug', 'info', 'warning'
  and 'error'. The default value is 'error' and configures the least
  amount of verbosity.

* The 'bgscan' attribute may be used to configure the way the
  supplicant performs background-scanning to steer or rather optimize
  roaming decision within the same network. The default value is set
  to 'simple:30:-70:600'. It can be disabled by specifying an empty
  value, e.g. 'bgscan=""'.

* The 'verbose_state' attribute was removed alltogether and similar
  functionality is now coverted by 'verbose' attribute.

Implementation-wise the internals changed significantly and are
outlined in the following paragraphs.

Formerly the interaction between the manager and the supplicant
was handled in an apparent way where the internal state of each
interaction was in plain sight. This made the flow cumbersome to
follow and therefor each interaction is now confined to its own
'Action' object that encapsulates the ping-pong of commands and
responses between the manager and the supplicant. All actions are
processed in an sequential way and thus there is no longer any
need to defer pending actions depending on the interal state of
the current interaction. Configuration changes as well as events
issued by the supplicant where new actions can be created are
handled in this fashion. Of note are both signal-handlers,
'_handle_cmds' and '_handle_events' respectively.

The state report, which provides the information about the current
state of connectivity to a given wireless network, was dealt with
in the same vein and its handling was spread across the manager
implementation. Again, to make it easier to follow, the generation
of the state report is now purely driven by the 'Join_state' object.
This object encapsulates the state of connectivity and is normally
updated by events issued from the supplicant (see '_handle_events').
It is also incorporated when handling command responses (see
'_handle_cmds').

Handling of timed-actions, like scan and signal quality
update requests, was done by setting a timeout at the Timer session
directly and thus only one timed-action could be pending at any time.
This excluded dealing with timed-actions like connected-scanning
and signal quality polling concurrently. This was changed and now
a One_shot_timeout is used to programm each concurrent timed-action.

For implementing the communication channel for the CTRL interface the
manager and supplicant use a shared memory buffer, the Msg_buffer.
Since the CTRL interface for Genode was implemented using C, some
shenanigans were performed to access the memory buffer. Now the
CTRL interface implementation uses C++ and only exports the functions
required by the supplicant as C. This simplifies the usage of the
Msg_buffer and allows for removing the global functions needed for
synchronizing the Msg_buffer access as those are now part of the
object itself via the 'Notify_interface'.

Fixes #5341.
2024-10-08 09:09:22 +02:00
Norman Feske
d565598489 wm: avoid initial flickering of child views
When starting testnit with the wm, the child views briefly appear at a
position relative to the top-left corner of the screen until the
top-level view has been positioned by the layouter. This patch keeps
child views invisible until their respective parent views are
positioned.
2024-10-07 15:54:59 +02:00
Norman Feske
5993fa9c7f wm: keep child views in front of their parent
When restacking a top-level view, execute the top-level restacking
before updating the child views. Otherwise, child views may wrongly
refer to the old stacking position of the top-level view.

Issue #5242
2024-10-07 15:54:59 +02:00
Norman Feske
9cd87a8495 wm: update coding style
Use Genode namespace, indicate 'Main' members as being private,
use Session_object, remove unused '_focus_request_reporter',
use Id_space for Window_registry, replace lookup by with pattern.
2024-10-07 15:54:59 +02:00
Norman Feske
ec50c008bb wm: account session resources
With this patch, the wm accounts RAM and caps consumed on behalf of its
clients to the respective client's session quota instead of paying out
of its own pocket. This should make the wm resilient against resource
exhaustion and lowers the quota requirements.

Issue #5340
2024-10-07 15:54:59 +02:00
Norman Feske
cf507a0b86 wm: replace Rpc_object by Session_object
This will ease the tracking of session resources.

Issue #5340
2024-10-07 14:44:31 +02:00
Norman Feske
dd13a976af wm: alloc real view IDs locally
Don't use client-provided view IDs as IDs for the wrapped nitpicker
views. There is no 1:1 relation of IDs and physical views. So if a wm
client re-uses an ID, the physical view is expected to stay in tact.
If the corresponding view object within the wm is not destroyed, however,
its ID remains allocated, which may then conflict the ID of a new view
if the ID is reused by the client. This scenario resulted in the
following error:

  Error: Uncaught exception of type 'Genode::Id_space<Gui::View_ref>::Conflicting_id'

This patch handles the situation by keeping the allocator of physical
views (_real_view) decoupled from the client's ID allocator.

Issue #5242
2024-09-06 10:38:45 +02:00
Johannes Schlatow
0a178dc625 fs_query: replace Avl_tree by Dictonary
This allows checking for duplicate directory entries. This occurs when
there are overlayed file systems.

Fixes #5334
2024-09-06 10:37:41 +02:00