]> git.mdlowis.com Git - proto/labwc.git/commitdiff
output: avoid calling wlr_xdg_surface_get_geometry()
authorJohan Malm <jgm323@gmail.com>
Mon, 7 Sep 2020 18:50:19 +0000 (19:50 +0100)
committerJohan Malm <jgm323@gmail.com>
Mon, 7 Sep 2020 18:50:19 +0000 (19:50 +0100)
Try to only call wlr_xdg_surface_get_geometry() in .commit and .map

src/output.c

index 9b150abcb7d3a23aec6aa9ca7919363ef723c09d..051514d48f5965aab675605ab9b639ed96c901db 100644 (file)
@@ -25,9 +25,10 @@ static void render_cycle_box(struct output *output)
                    !rc.client_side_decorations) {
                        box = deco_max_extents(view);
                } else {
-                       box = view_get_surface_geometry(view);
-                       box.x += view->x;
-                       box.y += view->y;
+                       box.x = view->x;
+                       box.y = view->y;
+                       box.width = view->w;
+                       box.height = view->h;
                }
                float cycle_color[] = { 0.0, 0.0, 0.0, 0.2 };
                wlr_render_rect(output->server->renderer, &box, cycle_color,