LayerSurface: fix surfaces on multiple outputs at once
The previous commit broke handling of keyboard interactive layer surfaces being created on multiple outputs at once. This new approach reverts part of the logic change in the previous commit while keeping the fix for the crash and the new assertion.
This commit is contained in:
parent
133b88c266
commit
eaa2f6d37e
@ -166,11 +166,16 @@ fn handleKeyboardInteractiveExclusive(output: *Output) void {
|
||||
while (it) |node| : (it = node.next) {
|
||||
const seat = &node.data;
|
||||
|
||||
if (topmost_surface) |to_focus| {
|
||||
// If we found a surface that requires focus, grab the focus of all
|
||||
// seats.
|
||||
seat.setFocusRaw(.{ .layer = to_focus });
|
||||
} else if (seat.focused == .layer) {
|
||||
if (seat.focused_output == output) {
|
||||
if (topmost_surface) |to_focus| {
|
||||
// If we found a surface on the output that requires focus, grab the focus of all
|
||||
// seats that are focusing that output.
|
||||
seat.setFocusRaw(.{ .layer = to_focus });
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (seat.focused == .layer) {
|
||||
const current_focus = seat.focused.layer.wlr_layer_surface;
|
||||
// If the seat is currently focusing an unmapped layer surface or one
|
||||
// without keyboard interactivity, stop focusing that layer surface.
|
||||
|
Loading…
Reference in New Issue
Block a user