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.
This commit is contained in:
Zakariyya Von Forslun 2022-06-09 15:07:45 +10:00
parent 37da205be0
commit 9b04109c82

View File

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