git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitb1c20907e1e12835e7201420a01e38e718a7d4fd
parent0677fe8d45
authorIsaac Freund <[email protected]>
date2024-01-03 16:31
xdg-activation: fix race with transaction system

This code could allows the view to be focused and urgent at the
same time if the request to activate the view is received just after
the pending focus has been set but before the transaction completes.

 river/Server.zig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/river/Server.zig b/river/Server.zig
index 56bb2ca..c5b0b39 100644
--- a/river/Server.zig
+++ b/river/Server.zig
@@ -289,7 +289,7 @@ fn handleRequestActivate(
 
     const node_data = SceneNodeData.fromSurface(event.surface) orelse return;
     switch (node_data.data) {
-        .view => |view| if (view.current.focus == 0) {
+        .view => |view| if (view.pending.focus == 0) {
             view.pending.urgent = true;
             server.root.applyPending();
         },