mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
sway: prevent layer-shell-surfaces from receiving input when it is inhibited
seat_set_focus_layer is missing an inhibition check allowing layer-shell surfaces to be focused even when it is inhibited. layer-shell surfaces also don't lose keyboard focus in seat_set_exclusive_client. This breaks assumptions made by input_inhibitor clients.
This commit is contained in:
parent
1c69d0e72f
commit
625b6e1ec4
1 changed files with 7 additions and 2 deletions
|
|
@ -1326,7 +1326,7 @@ void seat_set_focus_layer(struct sway_seat *seat,
|
|||
seat_set_focus(seat, previous);
|
||||
}
|
||||
return;
|
||||
} else if (!layer || seat->focused_layer == layer) {
|
||||
} else if (!layer || seat->focused_layer == layer || !seat_is_input_allowed(seat, layer->surface)) {
|
||||
return;
|
||||
}
|
||||
assert(layer->mapped);
|
||||
|
|
@ -1362,7 +1362,12 @@ void seat_set_exclusive_client(struct sway_seat *seat,
|
|||
}
|
||||
if (seat->wlr_seat->pointer_state.focused_client) {
|
||||
if (seat->wlr_seat->pointer_state.focused_client->client != client) {
|
||||
wlr_seat_pointer_notify_clear_focus(seat->wlr_seat);
|
||||
wlr_seat_pointer_clear_focus(seat->wlr_seat);
|
||||
}
|
||||
}
|
||||
if (seat->wlr_seat->keyboard_state.focused_client) {
|
||||
if (seat->wlr_seat->keyboard_state.focused_client->client != client) {
|
||||
wlr_seat_keyboard_clear_focus(seat->wlr_seat);
|
||||
}
|
||||
}
|
||||
struct timespec now;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue