output: avoid calling wlr_xdg_surface_get_geometry()

Try to only call wlr_xdg_surface_get_geometry() in .commit and .map
This commit is contained in:
Johan Malm 2020-09-07 19:50:19 +01:00
parent afaf78aa72
commit 17f7ef53be

View file

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