From: tokyo4j Date: Fri, 6 Dec 2024 04:57:50 +0000 (+0900) Subject: menu: slightly slide menus opened from buttons X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=2ade6a1e85a22a640452ed38d94ae66b0243f281;p=proto%2Flabwc.git 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. --- diff --git a/src/action.c b/src/action.c index 9da1b796..195a9171 100644 --- a/src/action.c +++ b/src/action.c @@ -678,6 +678,7 @@ show_menu(struct server *server, struct view *view, struct cursor_context *ctx, assert(ctx->node); int ly; wlr_scene_node_coords(ctx->node, &x, &ly); + x -= server->theme->menu_border_width; } }