aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZakariyya Von Forslun <zakariyyavf@protonmail.com>2022-06-09 15:07:45 +1000
committerZakariyya Von Forslun <zakariyyavf@protonmail.com>2022-06-09 15:10:55 +1000
commit9b04109c8255b447d14589962c44a4a3e531cfea (patch)
tree15bb79f8b6086b12a85ec6240b1ac62353bb4cff
parent37da205be0c49969bc8dce9c784e785247eb4f30 (diff)
downloadriver-9b04109c8255b447d14589962c44a4a3e531cfea.tar.gz
river-9b04109c8255b447d14589962c44a4a3e531cfea.tar.xz
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.
-rw-r--r--river/Cursor.zig5
1 files 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;
}
},
}