mirror of
https://github.com/swaywm/sway.git
synced 2026-04-16 08:21:30 -04:00
set has_focus to false when focus is NULL
Set has_focus to false in seat_unfocus_unless_client when seat_get_focus() returns NULL.
This commit is contained in:
parent
7ef26f9a92
commit
8420113af5
1 changed files with 3 additions and 1 deletions
|
|
@ -1344,7 +1344,9 @@ void seat_unfocus_unless_client(struct sway_seat *seat, struct wl_client *client
|
|||
}
|
||||
if (seat->has_focus) {
|
||||
struct sway_node *focus = seat_get_focus(seat);
|
||||
if (focus && node_is_view(focus) && wl_resource_get_client(
|
||||
if (!focus) {
|
||||
seat->has_focus = false;
|
||||
} else if (node_is_view(focus) && wl_resource_get_client(
|
||||
focus->sway_container->view->surface->resource) != client) {
|
||||
seat_set_focus(seat, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue