From 9b04109c8255b447d14589962c44a4a3e531cfea Mon Sep 17 00:00:00 2001 From: Zakariyya Von Forslun Date: Thu, 9 Jun 2022 15:07:45 +1000 Subject: 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; } }, } -- cgit v1.2.3