]> git.mdlowis.com Git - proto/labwc.git/commitdiff
layers: arrange layers on output-layout change
authorJohan Malm <jgm323@gmail.com>
Wed, 2 Mar 2022 20:25:57 +0000 (20:25 +0000)
committerJohan Malm <jgm323@gmail.com>
Wed, 2 Mar 2022 20:26:09 +0000 (20:26 +0000)
src/output.c
src/server.c

index 61dcc286c772beba34005ae8ca226b18d30ab65a..e7758d7ff4f6a193393190b7323fba7f52440d94 100644 (file)
@@ -156,6 +156,7 @@ output_init(struct server *server)
                wlr_log(WLR_ERROR, "unable to create output layout");
                exit(EXIT_FAILURE);
        }
+       wlr_scene_attach_output_layout(server->scene, server->output_layout);
 
        /* Enable screen recording with wf-recorder */
        wlr_xdg_output_manager_v1_create(server->wl_display,
@@ -319,12 +320,11 @@ handle_output_layout_change(struct wl_listener *listener, void *data)
                }
                struct output *output;
 
-               /* FIXME: Sort this out */
-//             wl_list_for_each(output, &server->outputs, link) {
-//                     if (output) {
-//                             arrange_layers(output);
-//                     }
-//             }
+               wl_list_for_each(output, &server->outputs, link) {
+                       if (output) {
+                               arrange_layers(output);
+                       }
+               }
                output_update_for_layout_change(server);
        }
 }
index f23d9055c8aabe5b6229aa9a0283934da1d699aa..fccde1430a97790673a18492dbbb3ced8b870ba4 100644 (file)
@@ -216,8 +216,6 @@ server_init(struct server *server)
        wl_list_init(&server->views);
        wl_list_init(&server->unmanaged_surfaces);
 
-       output_init(server);
-
        server->scene = wlr_scene_create();
        if (!server->scene) {
                wlr_log(WLR_ERROR, "unable to create scene");
@@ -229,7 +227,8 @@ server_init(struct server *server)
 #endif
        server->menu_tree = wlr_scene_tree_create(&server->scene->node);
        server->osd_tree = wlr_scene_tree_create(&server->scene->node);
-       wlr_scene_attach_output_layout(server->scene, server->output_layout);
+
+       output_init(server);
 
        /*
         * Create some hands-off wlroots interfaces. The compositor is