mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Ensure that seat->focused_layer is cleared on unmap
The current seat may have changed between the last focus change and this unmap, so we need to scan through all seats to find our layer.
This commit is contained in:
parent
07d7af593d
commit
b2ee5bc05d
1 changed files with 5 additions and 3 deletions
|
@ -301,9 +301,11 @@ static void unmap(struct sway_layer_surface *sway_layer) {
|
||||||
output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y,
|
output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y,
|
||||||
sway_layer->layer_surface->surface, true);
|
sway_layer->layer_surface->surface, true);
|
||||||
|
|
||||||
struct sway_seat *seat = input_manager_current_seat();
|
struct sway_seat *seat;
|
||||||
if (seat->focused_layer == sway_layer->layer_surface) {
|
wl_list_for_each(seat, &server.input->seats, link) {
|
||||||
seat_set_focus_layer(seat, NULL);
|
if (seat->focused_layer == sway_layer->layer_surface) {
|
||||||
|
seat_set_focus_layer(seat, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor_rebase_all();
|
cursor_rebase_all();
|
||||||
|
|
Loading…
Reference in a new issue