]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: if view->fullscreen on destroy, re-enable top-layer
authorJohan Malm <jgm323@gmail.com>
Tue, 7 Jun 2022 21:28:25 +0000 (22:28 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 7 Jun 2022 21:41:37 +0000 (23:41 +0200)
The layer-shell top-layer is disabled when running an application in
fullscreen mode, so if this is the case on view_destroy() we have to
re-enabled the top-layer again.

Reported-by: @heroin-moose
Helped-by: @Consolatis
Fixes #377

src/view.c

index 5844146d6af379872e4c880fdf988e540748947c..e96377b72376442762041072f206e8c0d8f7b97f 100644 (file)
@@ -743,6 +743,18 @@ view_destroy(struct view *view)
                view->scene_tree = NULL;
        }
 
+       /*
+        * The layer-shell top-layer is disabled when an application is running
+        * in fullscreen mode, so if that's the case, we have to re-enable it
+        * here.
+        */
+       if (view->fullscreen) {
+               struct output *output =
+                       output_from_wlr_output(view->server, view->fullscreen);
+               uint32_t top = ZWLR_LAYER_SHELL_V1_LAYER_TOP;
+               wlr_scene_node_set_enabled(&output->layer_tree[top]->node, true);
+       }
+
        /* Remove view from server->views */
        wl_list_remove(&view->link);
        free(view);