mirror of
https://github.com/swaywm/sway.git
synced 2026-06-13 14:33:19 -04:00
input/seat: prevent layer surfaces from focusing under session lock
When the screen is locked, `server.session_lock.lock` is active and keyboard input must be forced to the screen lock surface. While `seat_set_focus` checked for an active session lock and redirected focus, `seat_set_focus_layer` was missing the same check. This allowed layer surfaces to steal keyboard input while the screen lock was active. This commit adds the missing session check to `seat_set_focus_layer` to prevent layer surfaces from being focused when the screen is locked.
This commit is contained in:
parent
97c342f9e1
commit
efa5ee7947
1 changed files with 3 additions and 0 deletions
|
|
@ -1312,6 +1312,9 @@ void seat_set_focus_layer(struct sway_seat *seat,
|
||||||
} else if (!layer) {
|
} else if (!layer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (server.session_lock.lock) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
assert(layer->surface->mapped);
|
assert(layer->surface->mapped);
|
||||||
if (layer->current.layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP &&
|
if (layer->current.layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP &&
|
||||||
layer->current.keyboard_interactive
|
layer->current.keyboard_interactive
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue