seat: don't deactivate view for any non-view surface

Now we now longer gray-out the active window when opening a focusable
popup menu (e.g. the applications menu from an XWayland panel). This
matches Openbox behavior.
This commit is contained in:
John Lindgren 2024-02-14 03:11:32 -05:00 committed by Johan Malm
parent 11cdad0c11
commit bb8f0bc960

View file

@ -474,20 +474,11 @@ focus_change_notify(struct wl_listener *listener, void *data)
struct wlr_surface *surface = event->new_surface; struct wlr_surface *surface = event->new_surface;
struct view *view = surface ? view_from_wlr_surface(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 * Prevent focus switch to non-view surface (e.g. layer-shell
* same application as the focused view, allow the view to remain * or xwayland-unmanaged) from updating view state
* active. This fixes an issue with menus immediately closing in
* some X11 apps (try LibreOffice with SAL_USE_VCLPLUGIN=gen).
*/ */
if (!view && server->active_view && event->new_surface if (surface && !view) {
&& view_is_related(server->active_view,
event->new_surface)) {
return; return;
} }