]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/layers.c: Prevent re-arranging views if usable_area didn't change
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 30 Jun 2022 22:55:15 +0000 (00:55 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 2 Jul 2022 11:43:23 +0000 (12:43 +0100)
src/layers.c

index 47c0d021926f85f57d1ab0d91919bd4e931c55a5..674deaa941f10cac51d7361138a8cb8bf5b24648 100644 (file)
@@ -25,6 +25,7 @@ layers_arrange(struct output *output)
        wlr_output_effective_resolution(output->wlr_output,
                &full_area.width, &full_area.height);
        struct wlr_box usable_area = full_area;
+       struct wlr_box old_usable_area = output->usable_area;
 
        struct server *server = output->server;
        struct wlr_scene_output *scene_output =
@@ -100,7 +101,10 @@ layers_arrange(struct output *output)
        }
 
        /* Finally re-arrange all views based on usable_area */
-       desktop_arrange_all_views(server);
+       if (old_usable_area.width != output->usable_area.width
+                       || old_usable_area.height != output->usable_area.height) {
+               desktop_arrange_all_views(server);
+       }
 }
 
 static void