]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: Keep unmanaged surfaces stacked on top
authorJohn Lindgren <john@jlindgren.net>
Thu, 1 Sep 2022 18:33:42 +0000 (14:33 -0400)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 1 Sep 2022 19:07:04 +0000 (21:07 +0200)
src/xwayland-unmanaged.c
src/xwayland.c

index 56befc9035c8e683749bc65c0b0a2e63c7101bb9..ca78722de7718444589d07df01fa69ffc1342fcb 100644 (file)
@@ -32,6 +32,8 @@ unmanaged_handle_map(struct wl_listener *listener, void *data)
                wl_container_of(listener, unmanaged, map);
        struct wlr_xwayland_surface *xsurface = unmanaged->xwayland_surface;
 
+       /* Stack new surface on top */
+       wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_ABOVE);
        wl_list_insert(unmanaged->server->unmanaged_surfaces.prev,
                       &unmanaged->link);
 
index 41f51c78f583b7085a67af121e427b6d8bdcad7e..ca4646dc8f1d68371e5c3ced56e1906220cd7619 100644 (file)
@@ -386,6 +386,13 @@ set_activated(struct view *view, bool activated)
        wlr_xwayland_surface_activate(surface, activated);
        if (activated) {
                wlr_xwayland_surface_restack(surface, NULL, XCB_STACK_MODE_ABOVE);
+               /* Restack unmanaged surfaces on top */
+               struct xwayland_unmanaged *u;
+               struct wl_list *list = &view->server->unmanaged_surfaces;
+               wl_list_for_each (u, list, link) {
+                       wlr_xwayland_surface_restack(u->xwayland_surface, NULL,
+                                                    XCB_STACK_MODE_ABOVE);
+               }
        }
 }