]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: hide content tree at re-map if shaded
authorJohn Lindgren <john@jlindgren.net>
Mon, 24 Nov 2025 17:00:34 +0000 (12:00 -0500)
committerJohn Lindgren <john@jlindgren.net>
Thu, 27 Nov 2025 06:26:55 +0000 (01:26 -0500)
src/view.c
src/xwayland.c

index f9dd3e0b2bf40ae9ba2c687c475fafd08365195f..250ac1ab731a9a0090f01709af1e0a02862e3507 100644 (file)
@@ -2517,7 +2517,11 @@ view_set_shade(struct view *view, bool shaded)
 
        view->shaded = shaded;
        ssd_enable_shade(view->ssd, view->shaded);
-       /* An unmapped view may not have a content tree */
+       /*
+        * An unmapped view may not have a content tree. When the view
+        * is mapped again, the new content tree will be hidden by the
+        * map handler, if the view is still shaded at that point.
+        */
        if (view->content_tree) {
                wlr_scene_node_set_enabled(&view->content_tree->node,
                        !view->shaded);
index 5600e8d29827617a755fc44ae232f0430fea95ad..efd8d8bef58ad1db6d5f9e87ab721ad96dd57c05 100644 (file)
@@ -816,6 +816,8 @@ handle_map(struct wl_listener *listener, void *data)
                }
        }
 
+       wlr_scene_node_set_enabled(&view->content_tree->node, !view->shaded);
+
        if (!view->been_mapped) {
                check_natural_geometry(view);
                set_initial_position(view, xwayland_surface);