From ebb6d1bdd1ce4d0a2a0f1dff275cdef8a7722bea Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 3 Jan 2024 16:31:30 -0600 Subject: 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(); }, -- cgit v1.2.3