Seat: guard setFocusRaw() usage while locked

Focusing a layer shell or Xwayland override redirect surface while
locked is a bug.
This commit is contained in:
Isaac Freund 2023-02-10 13:12:11 +01:00
parent 919d5d7c62
commit e1ab51f260
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11
2 changed files with 4 additions and 0 deletions

View File

@ -293,6 +293,8 @@ pub fn arrangeLayers(self: *Self, target: ArrangeLayersTarget) void {
if (target == .unmapped) return; if (target == .unmapped) return;
if (server.lock_manager.state != .unlocked) return;
// Find the topmost layer surface in the top or overlay layers which // Find the topmost layer surface in the top or overlay layers which
// requests keyboard interactivity if any. // requests keyboard interactivity if any.
const topmost_surface = outer: for (layers[0..2]) |layer| { const topmost_surface = outer: for (layers[0..2]) |layer| {

View File

@ -101,6 +101,8 @@ pub fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface:
} }
pub fn focusIfDesired(self: *Self) void { pub fn focusIfDesired(self: *Self) void {
if (server.lock_manager.state != .unlocked) return;
if (self.xwayland_surface.overrideRedirectWantsFocus() and if (self.xwayland_surface.overrideRedirectWantsFocus() and
self.xwayland_surface.icccmInputModel() != .none) self.xwayland_surface.icccmInputModel() != .none)
{ {