Commit Graph

21 Commits

Author SHA1 Message Date
033cad47bf build: update to Zig 0.12 2024-05-20 11:35:36 +02:00
1b63c463a7 security-context: implement protocol
Sensitive Wayland protocols such as wlr_screencopy and wlr_data_control
(clipboard managment) are now blocked by default inside security
contexts (e.g. flatpak 1.15.6 or later).

User configuration of the allowlist/blocklist is TODO.
2024-03-15 14:47:43 +01:00
693a2b0dda XwaylandOverrideRedirect: eliminate "self" naming convention 2024-03-14 12:29:49 +01:00
7ee6c79b6b build: update to wlroots 0.17 2023-12-01 17:29:05 +01:00
50ccd4c5b3 session-lock: fix pointer focus handling on map 2023-11-17 19:51:57 +01:00
4726a6b0f1 Root: migrate {all,active}_outputs to wl.list
As discussed with ifreund on irc. This avoids extra allocation in case
of all_outputs and confusion in case of active_outputs (because with the
Output embedded in the Node, i thought its value was copied instead of
its pointer).
2023-08-13 11:10:46 +00:00
57186fced3 Root: rename field outputs to active_outputs
Although this list only including active outputs was already documented,
making this explicit in its name reduces confusion and debugging
overhead.
2023-08-13 11:06:25 +00:00
3865a7be7c session-lock: fix assertion failures and clean up
The removed assertions aren't possible to guarantee due to the fact that
the lock render state is updated asynchronously as the output is
rendered.
2023-03-24 15:27:25 +01:00
f5f9b526a0 river: fix a few leaks 2023-03-04 20:12:37 +01:00
4a9d84bdb8 Xwayland: hide override redirect windows if locked 2023-03-03 15:21:54 +01:00
6411c71151 Root: centralize focus(null) calls in applyPending() 2023-03-01 10:49:44 +01:00
b38676f078 session-lock: use the scene graph 2023-02-28 14:55:58 +01:00
168756cbe8 render: remove damage tracking
This will be handled by wlr_scene shortly.
2023-02-28 14:55:58 +01:00
6c7586e8d7 session-lock: properly handle disabled outputs
Outputs that are part of the layout but currently disabled (e.g. due
to use of wlr-output-power-management) are not correctly handled as
river currently waits for them to present a new locked frame before
sending the locked event.

This new frame never comes however since the output is disabled. Fix
this by maintaining the correct Output.lock_render_state as outputs
are enabled/disabled.

Additionally add missing maybeLock() calls to handle the case that all
outputs in the layout are disabled.
2023-01-18 12:31:07 +01:00
09f3f141ae deps: update to Zig 0.10 2023-01-08 16:21:42 +01:00
4dd02358d9 session-lock: fix assertion failure on abnormal client behavior
If the client commits a protocol error or otherwise crashes before the
session has been fully locked, we currently try to send the locked event
without checking if the client has been destroyed.

This commit adds the necessary if statement.
2023-01-07 17:35:22 +01:00
df2fc30238 session-lock: wait for present before locking
Currently we send the locked event after rendering and commit of blank
or lock surfaces buffers on all outputs. However, this is technically
not enough to ensure that the buffers have been presented.

Instead, listen to the wlr_output present event to ensure that no
normal, "unlocked" content is possibly visible.
2023-01-06 18:51:40 +01:00
8f8d94aa45 session-lock: fix potential race
Currently the session lock client has no 100% safe way to know when it
is safe to suspend after requesting that the session be locked.

For a suspend to be safe the compositor must have either blanked or
rendered a lock surface on all outputs before suspending. This is
because the current framebuffer on suspend appears to be saved and
displayed again after suspend, at least on my Linux system.

If a new "locked" frame for all outputs is not rendered before suspend,
an "unlocked" frame or frames will likely be briefly displayed on resume
before the lock surfaces are rendered or the screen is blanked.

To fix this, wait until a lock surface has been rendered on all outputs,
or if that times out until all outputs have been blanked, before sending
the locked event to the client.

Resolving this race on the compositor side without protocol changes
is the most effective way to avoid this potential information leak,
regardless of which session lock client is used.
2022-12-29 18:25:12 +01:00
98d2f6a568 session-lock: add basic logging 2022-11-13 16:45:18 +01:00
49efbfe046 session-lock: handle output unplugging better 2022-11-13 16:45:18 +01:00
33187e0b09 ext-session-lock: implement protocol 2022-11-13 16:45:18 +01:00