src/layers.c: minor simplification

This commit is contained in:
Consolatis 2023-01-01 18:26:25 +01:00 committed by Johan Malm
parent d094533955
commit 84b3df4ef2

View file

@ -69,7 +69,7 @@ layers_arrange(struct output *output)
scene_output->y); scene_output->y);
} }
memcpy(&output->usable_area, &usable_area, sizeof(output->usable_area)); output->usable_area = usable_area;
/* Find topmost keyboard interactive layer, if such a layer exists */ /* Find topmost keyboard interactive layer, if such a layer exists */
uint32_t layers_above_views[] = { uint32_t layers_above_views[] = {
@ -104,8 +104,7 @@ layers_arrange(struct output *output)
} }
/* Finally re-arrange all views based on usable_area */ /* Finally re-arrange all views based on usable_area */
if (old_usable_area.width != output->usable_area.width if (!wlr_box_equal(&old_usable_area, &usable_area)) {
|| old_usable_area.height != output->usable_area.height) {
desktop_arrange_all_views(server); desktop_arrange_all_views(server);
} }
cursor_update_focus(output->server); cursor_update_focus(output->server);