From 9ce57c5f36f680b1f47e6e42d4dd4b975c58985b Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sun, 2 Nov 2025 11:37:57 +0900 Subject: [PATCH] workspaces: place osd at the center of output rather than usable area --- src/workspaces.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/workspaces.c b/src/workspaces.c index 43f19b18..f56d170a 100644 --- a/src/workspaces.c +++ b/src/workspaces.c @@ -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,