Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Cursor: fix focus for Xwayland override redirect windows
Setting focus on button click for override redirect windows did not
consider whether the window actually wants focus.
river/Cursor.zig | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/river/Cursor.zig b/river/Cursor.zig
index 0b90054..4557bad 100644
--- a/river/Cursor.zig
+++ b/river/Cursor.zig
@@ -316,10 +316,9 @@ fn handleButton(listener: *wl.Listener(*wlr.Pointer.event.Button), event: *wlr.P
}
},
.xwayland_override_redirect => |override_redirect| {
- if (build_options.xwayland) {
+ if (!build_options.xwayland) unreachable;
+ if (override_redirect.xwayland_surface.overrideRedirectWantsFocus()) {
self.seat.setFocusRaw(.{ .xwayland_override_redirect = override_redirect });
- } else {
- unreachable;
}
},
}