Commit Graph

21 Commits

Author SHA1 Message Date
Isaac Freund
033cad47bf
build: update to Zig 0.12 2024-05-20 11:35:36 +02:00
Isaac Freund
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
Isaac Freund
693a2b0dda
XwaylandOverrideRedirect: eliminate "self" naming convention 2024-03-14 12:29:49 +01:00
Isaac Freund
7ee6c79b6b
build: update to wlroots 0.17 2023-12-01 17:29:05 +01:00
Isaac Freund
50ccd4c5b3
session-lock: fix pointer focus handling on map 2023-11-17 19:51:57 +01:00
tiosgz
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
tiosgz
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
Isaac Freund
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
Isaac Freund
f5f9b526a0
river: fix a few leaks 2023-03-04 20:12:37 +01:00
Isaac Freund
4a9d84bdb8
Xwayland: hide override redirect windows if locked 2023-03-03 15:21:54 +01:00
Isaac Freund
6411c71151
Root: centralize focus(null) calls in applyPending() 2023-03-01 10:49:44 +01:00
Isaac Freund
b38676f078
session-lock: use the scene graph 2023-02-28 14:55:58 +01:00
Isaac Freund
168756cbe8
render: remove damage tracking
This will be handled by wlr_scene shortly.
2023-02-28 14:55:58 +01:00
Isaac Freund
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
Isaac Freund
09f3f141ae
deps: update to Zig 0.10 2023-01-08 16:21:42 +01:00
Isaac Freund
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
Isaac Freund
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
Isaac Freund
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
Isaac Freund
98d2f6a568
session-lock: add basic logging 2022-11-13 16:45:18 +01:00
tiosgz
49efbfe046
session-lock: handle output unplugging better 2022-11-13 16:45:18 +01:00
Isaac Freund
33187e0b09
ext-session-lock: implement protocol 2022-11-13 16:45:18 +01:00