seat: do not update active_view on layer-shell keyboard focus

...because layer-shell clients are not views and we want to be able to
use foreign-toplevel protocol on the active view even if a client such as
a panel has taken keyboard focus.

Written-by: @Consolatis

Fixes: #1336
This commit is contained in:
Johan Malm 2023-12-19 17:45:43 +00:00 committed by Johan Malm
parent 3a959cc74b
commit 6a2a52c0ad

View file

@ -349,8 +349,13 @@ focus_change_notify(struct wl_listener *listener, void *data)
struct seat *seat = wl_container_of(listener, seat, focus_change); struct seat *seat = wl_container_of(listener, seat, focus_change);
struct wlr_seat_keyboard_focus_change_event *event = data; struct wlr_seat_keyboard_focus_change_event *event = data;
struct server *server = seat->server; struct server *server = seat->server;
struct view *view = event->new_surface ? struct wlr_surface *surface = event->new_surface;
view_from_wlr_surface(event->new_surface) : NULL; struct view *view = surface ? view_from_wlr_surface(surface) : NULL;
/* Prevent focus switch to layershell client from updating view state */
if (surface && wlr_layer_surface_v1_try_from_wlr_surface(surface)) {
return;
}
/* /*
* If an xwayland-unmanaged surface was focused belonging to the * If an xwayland-unmanaged surface was focused belonging to the