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:
		| @ -293,6 +293,8 @@ pub fn arrangeLayers(self: *Self, target: ArrangeLayersTarget) void { | ||||
|  | ||||
|     if (target == .unmapped) return; | ||||
|  | ||||
|     if (server.lock_manager.state != .unlocked) return; | ||||
|  | ||||
|     // Find the topmost layer surface in the top or overlay layers which | ||||
|     // requests keyboard interactivity if any. | ||||
|     const topmost_surface = outer: for (layers[0..2]) |layer| { | ||||
|  | ||||
| @ -101,6 +101,8 @@ pub fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface: | ||||
| } | ||||
|  | ||||
| pub fn focusIfDesired(self: *Self) void { | ||||
|     if (server.lock_manager.state != .unlocked) return; | ||||
|  | ||||
|     if (self.xwayland_surface.overrideRedirectWantsFocus() and | ||||
|         self.xwayland_surface.icccmInputModel() != .none) | ||||
|     { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user