]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: remove "try to focus on parent surface" logic
authorJohn Lindgren <john@jlindgren.net>
Wed, 14 Feb 2024 03:32:14 +0000 (22:32 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 5 Mar 2024 20:51:32 +0000 (20:51 +0000)
This was apparently to fix an Intellij focus issue, but I don't see any
issues with Intellij currently, and the logic is wrong when the parent
XWayland surface doesn't want focus (e.g. an XWayland panel with a
focusable applications menu).

src/xwayland-unmanaged.c

index 036b702b703aa725e35f56bac7e4c369091b18f0..72dce1ffcced2986bcbc240a306d3fa150b44204 100644 (file)
@@ -62,16 +62,6 @@ handle_map(struct wl_listener *listener, void *data)
 static void
 focus_next_surface(struct server *server, struct wlr_xwayland_surface *xsurface)
 {
-       /*
-        * Try to focus on parent surface
-        * This seems to fix JetBrains/Intellij window focus issues
-        */
-       if (xsurface->parent && xsurface->parent->surface
-                       && wlr_xwayland_or_surface_wants_focus(xsurface->parent)) {
-               seat_focus_surface(&server->seat, xsurface->parent->surface);
-               return;
-       }
-
        /* Try to focus on last created unmanaged xwayland surface */
        struct xwayland_unmanaged *u;
        struct wl_list *list = &server->unmanaged_surfaces;