menu: slightly slide menus opened from buttons

This commit slides menus opened from buttons (with atCursor="no") to the
left by menu.border.width. This makes the location of the window menu
look more natural, especially when it's opened from the window icon in
the left corner of the titlebar.
This commit is contained in:
tokyo4j 2024-12-06 13:57:50 +09:00
parent 9a9eaee5a1
commit 6962c7dbd7

View file

@ -678,6 +678,7 @@ show_menu(struct server *server, struct view *view, struct cursor_context *ctx,
assert(ctx->node); assert(ctx->node);
int ly; int ly;
wlr_scene_node_coords(ctx->node, &x, &ly); wlr_scene_node_coords(ctx->node, &x, &ly);
x -= server->theme->menu_border_width;
} }
} }