]> git.mdlowis.com Git - proto/labwc.git/commitdiff
workspaces: place osd at the center of output rather than usable area
authortokyo4j <hrak1529@gmail.com>
Sun, 2 Nov 2025 02:37:57 +0000 (11:37 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 2 Nov 2025 03:27:39 +0000 (04:27 +0100)
src/workspaces.c

index 43f19b1860070e07339260be6464711902c019cd..f56d170ab951c544bbcd5cd37b1301e9b8d0d6a2 100644 (file)
@@ -170,12 +170,8 @@ _osd_update(struct server *server)
                struct wlr_box output_box;
                wlr_output_layout_get_box(output->server->output_layout,
                        output->wlr_output, &output_box);
-               int lx = output->usable_area.x
-                       + (output->usable_area.width - width) / 2
-                       + output_box.x;
-               int ly = output->usable_area.y
-                       + (output->usable_area.height - height) / 2
-                       + output_box.y;
+               int lx = output_box.x + (output_box.width - width) / 2;
+               int ly = output_box.y + (output_box.height - height) / 2;
                wlr_scene_node_set_position(&output->workspace_osd->node, lx, ly);
                wlr_scene_buffer_set_buffer(output->workspace_osd, &buffer->base);
                wlr_scene_buffer_set_dest_size(output->workspace_osd,