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.
This commit is contained in:
Isaac Freund 2024-01-03 16:31:30 -06:00
parent 28dcd8320a
commit ebb6d1bdd1
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -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();
},