]> git.mdlowis.com Git - proto/labwc.git/commitdiff
seat: don't deactivate view for any non-view surface
authorJohn Lindgren <john@jlindgren.net>
Wed, 14 Feb 2024 08:11:32 +0000 (03:11 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 5 Mar 2024 20:51:32 +0000 (20:51 +0000)
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.

src/seat.c

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