From 8a7048fd789bf0a1fcea48ab4a5b3aac61e48d61 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Sat, 27 Aug 2022 13:26:30 +0100 Subject: [PATCH] osd: position preview border within SSD max extents This makes the border visible when alt-tabbing maximized windows and prevents it from rendering on other outputs or on top of exclusive layer-surfaces such as panels. Closes issue #496 --- src/osd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/osd.c b/src/osd.c index 7de869be..529818a5 100644 --- a/src/osd.c +++ b/src/osd.c @@ -100,13 +100,10 @@ osd_update_preview_outlines(struct view *view) wlr_scene_node_place_above(&rect->tree->node, &server->menu_tree->node); server->osd_preview_outline = rect; } - /* A multi_rect consists of 3 layered rects */ - int line_width = rect->line_width * 3; + struct wlr_box geo = ssd_max_extents(view); - multi_rect_set_size(rect, - geo.width + line_width * 2, geo.height + line_width * 2); - wlr_scene_node_set_position(&rect->tree->node, - geo.x - line_width, geo.y - line_width); + multi_rect_set_size(rect, geo.width, geo.height); + wlr_scene_node_set_position(&rect->tree->node, geo.x, geo.y); } void