mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
workspaces: place osd at the center of output rather than usable area
This commit is contained in:
parent
9b6e2b71e6
commit
9ce57c5f36
1 changed files with 2 additions and 6 deletions
|
|
@ -170,12 +170,8 @@ _osd_update(struct server *server)
|
||||||
struct wlr_box output_box;
|
struct wlr_box output_box;
|
||||||
wlr_output_layout_get_box(output->server->output_layout,
|
wlr_output_layout_get_box(output->server->output_layout,
|
||||||
output->wlr_output, &output_box);
|
output->wlr_output, &output_box);
|
||||||
int lx = output->usable_area.x
|
int lx = output_box.x + (output_box.width - width) / 2;
|
||||||
+ (output->usable_area.width - width) / 2
|
int ly = output_box.y + (output_box.height - height) / 2;
|
||||||
+ output_box.x;
|
|
||||||
int ly = output->usable_area.y
|
|
||||||
+ (output->usable_area.height - height) / 2
|
|
||||||
+ output_box.y;
|
|
||||||
wlr_scene_node_set_position(&output->workspace_osd->node, lx, ly);
|
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_buffer(output->workspace_osd, &buffer->base);
|
||||||
wlr_scene_buffer_set_dest_size(output->workspace_osd,
|
wlr_scene_buffer_set_dest_size(output->workspace_osd,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue