Commit Graph

13717 Commits

Author SHA1 Message Date
Christian Helmuth
61c9706353 depot: update recipe hashes 2024-10-08 11:30:26 +02:00
Norman Feske
c296795089 nitpicker: trigger info ds change on config update
Inform all GUI clients of a new version of the mode information whenever
the nitpicker configuration is modified. This is needed because changed
capture policies influence the panorama observable by the GUI clients.

Issue #5352
2024-10-08 09:09:25 +02:00
Christian Prochaska
57b10b9611 qt: adapt to 'Gui::Connection' interface changes
Issue #5353
2024-10-08 09:09:24 +02:00
Christian Helmuth
4a6c506f37 nitpicker: deliver press events to global key receiver
Fixes the following misbehavior: If a global key is pressed (e.g., Caps
Lock in Sculpt) and the mouse is clicked before release, the global-keys
handler receives the global-key press but no further events of the
sequence, especially *no Caps-Lock release*.

A more reasonable fix may address the "else branch" that deletes the
_input_receiver in case of mouse events without a hovered client too,
which is beyond the narrow scope of this fix.
2024-10-08 09:09:24 +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
92227df624 nitpicker: handle Input::Session::exclusive
While the focused client has enabled exclusive input, nitpicker does
not translate relative motion to absolute motion but routes relative
motion directly to the client. Additionally, the pointer origin is
forcibly moved to a position outside the screen boundaries, making the
pointer invisible.

Issue #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
03a23ad987 gui_fb: reset input sigh when closing the session
This patch mirrors the logic already in place for the framebuffer
session.
2024-10-08 09:09:24 +02:00
Norman Feske
4dd5c6ff8a test/fb_bench: make fb mode consistent with ds
Otherwise, the fb mode may refer to a new mode when the framebuffer is
resized between the call of 'dataspace' and 'mode'.
2024-10-08 09:09:24 +02:00
Norman Feske
b1d5a5f7b8 sculpt: version 24.10 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
d29cb0a15d Gui::Connection::buffer: fix upgrade loop
Once set to true, the 'retry' flag would never be reset to false.

Issue #5242
2024-10-08 09:09:24 +02:00
Christian Helmuth
bfce470690 app/usb_webcam: initialize libc environment
Restores debugging with LIBUSB_DEBUG=<level>.
2024-10-08 09:09:24 +02:00
Norman Feske
f324aa902b nitpicker: configurable capture policies
Capture clients used to always capture the view stack at the origin of
the coordinate system. So each capture client obtained a mirror of the
same picture. This patch allows for the placement of capture clients on
larger panorama using Genode's usual label-based policy-selection
approach. Thereby, each monitor in multi-monitor scenario can display a
different portion of the panorama.

The patch takes special care to always keep the pointer in a visible
position. The pointer cannot be moved to any area that is not captured.
Should the only capture client displaying the pointer disappear, the
pointer is warped to the center of (any) remaining capture client.

Fixes #5352
2024-10-08 09:09:24 +02:00
Norman Feske
88dc4c878f util/geometry.h: test (in)equality of rectangles
The operators == and != make the 'Rect' consistent with 'Point' and
'Area'. The patch also adds the 'Rect::clamp' method, which is generally
useful for sanitizing input.

Issue #5352
2024-10-08 09:09:24 +02:00
Christian Prochaska
7579fe5749 qt: adapt to 'Gui::Connection' interface changes
Issue #5351
2024-10-08 09:09:24 +02:00
Christian Prochaska
e528ebc374 qt: increase caps in run scripts
Issue #5340
2024-10-08 09:09:24 +02:00
Alexander Boettcher
458458b65f intel/display: support stop/wakeup protocol
Issue #5344
2024-10-08 09:09:24 +02:00
Alexander Boettcher
50cc52a091 intel/display: use one capture session per display
Fixes #5345
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
388218a3f9 os/surface.h: support windowed surface access
This patch eases the vertical organization of multiple surfaces within
one larger surface, which is the case when keeping front/back buffers
within one compounding GUI buffer.

Issue #5351
2024-10-08 09:09:23 +02:00
Norman Feske
bf064874db util/string.h: Byte_range_ptr::with_skipped_bytes
The new method provides a safe way to narrow the byte range to a
given offset.

Issue #5351
2024-10-08 09:09:23 +02:00
Norman Feske
5c20de212a base: Attached_dataspace::bytes accessor
The new bytes() accessor returns a Byte_range_pointer as an alternative
to the 'local_addr' for accessing the content of the dataspace. This
facilitates the safe practice of passing (and validating) the buffer
bounds along with the pointer.

Issue #5351
2024-10-08 09:09:23 +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
336d481726 os: Pixel_input8 type for input-mask access
Issue #5351
2024-10-08 09:09:23 +02:00
Norman Feske
b303fe1098 demo.run: increase nitlog RAM quota 2024-10-08 09:09:23 +02:00
Norman Feske
6522158caa gems/gui_buffer.h: atomic back-to-front blitting
This patch updates menu_view, themed_decorator, and rom_osci to use the
new frame-buffer blit operation, mitigating tearing artifacts

Issue #5350
2024-10-08 09:09:23 +02:00
Norman Feske
4565cd0143 demo/scout: use atomic panning and blitting
Issue #5350
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
e1b24d1ebd nano3d.run: increase caps for backdrop
Issue #5340
2024-10-08 09:09:23 +02:00
Norman Feske
b3ac8c5bd8 dialog: increase caps for sandboxed_runtime
With the reworked accounting of GUI-session resources, the default
of 100 caps for menu_view does not suffice.

Issue #5340
2024-10-08 09:09:23 +02:00
Sebastian Sumpf
4d559c2907 sculpt: name change imx8mq_usb_host -> imx8m_usb_host
issue #5264
2024-10-08 09:09:23 +02:00
Sebastian Sumpf
c27e25b5ca lx_emul: shmem_file.h adapt to folio changes
Everything related to compound pages is gradually removed and replaced
with folios.

issue #5264
2024-10-08 09:09:23 +02:00
Sebastian Sumpf
8530aa7540 lx_emul/start: move lx_emul_setup_arch behind kmem_cache_init
Call lx_emul_setup arch after kmem_cache_init, because
unflatten_device_tree requires 'memblock_alloc' which  does not work
when using native slub.c/memblock.c on ARM platforms.

issue #5264
2024-10-08 09:09:23 +02:00
Stefan Kalkowski
c0a0c0ae71 genode_c_api/usb: prevent invalid pointer deref
Limit the use of Reg_list::for_each that caches a next pointer
of its items to allow destruction of items in its lambda body.
Instead provide an Reg_list::apply function in addition, which
takes a condition lambda to find the matching item, and a lambda
processed on it. In most use-cases where for_each was used, only
one item was searched for. Here we can use apply now., without
the need for a cached pointer, nor too many iterations.

Fixes genodelabs/genode#5349
2024-10-08 09:09:23 +02:00
Josef Söntgen
a16ca36eb6 bsd_audio: remove unnecessary RM requirement
The explicit usage of the Rm session became obsolete with the
removal of the internal slab (see memory consumption commit).

Fixes #5348.
2024-10-08 09:09:23 +02:00
Benjamin Lamowski
66689fa799 usb_webcam: remove unneeded requirement on RM
The usb_webcam's runtime requires a Region Manager session even though
it is not needed by the application, remove it.

Fixes #5346
2024-10-08 09:09:23 +02:00
Norman Feske
fc4b026b62 nitpicker: remove periodic mode of operation
Unless nitpicker is used in 'request_framebuffer' mode, it no longer
depends on a periodic timer but merely acts as a broker between capture
clients and GUI clients. Sync signals as delivered to GUI clients are
now wired to Capture::Session::capture_at calls. So the display driver
defines the occurrence of those signals.

Note that sync signals are only delivered while a driver actively calls
'capture_at'. If a driver stops capturing, GUI clients no longer receive
any sync signal. This is a change from the previous situation where GUI
clients could depend on the periodicity of sync signals.

Issue #5347
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
Norman Feske
0e55119b36 liquid_framebuffer: reset signal handlers
Apply the same rationale as commit "gui_fb: reset signal handlers when
closing fb" to the liquid framebuffer.
2024-10-08 09:09:22 +02:00
Alexander Boettcher
4554ec42da nova: make write-combined unit test more robust
- touch all memory before time measurements, to reduce lazy paging jitter
- diff of 100us between 2 memset runs are now considered a failure (before 10us)
- add refrence measurements of same region size which is not write-combined
- make the output easier parse able of write-combined test

Fixes #5342
2024-10-08 09:09:22 +02:00
Norman Feske
09461c51bd capture_session: capture stop/wakeup protocol
With this change, a client (i.e., display driver) can register
a wakeup signal handler to be notified on the arrival of new data to
capture. The signal is delivered only when the client has stopped
capturing. The client propagates this condition to the server using
the new 'capture_stopped' RPC call.

This change in principle enables a display driver to suspend its
periodic mode of operation after a few frames without capturing any
new data. As the first driver, the fb_sdl driver has been adapted to
the new protocol. This change not only eliminates the driver's CPU
load when idle, it also reduces the latency of sporadic output
because the response to such GUI updates is no longer bound by a
fixed periodic interval.

Issue #5344
2024-10-08 09:09:22 +02:00
Norman Feske
c527a4e0e4 util/dirty_rect.h: accessor for empty state
Provide an easy way to check for the absence of any dirty pixels.

Issue #5344
2024-10-08 09:09:22 +02:00