]> git.mdlowis.com Git - proto/labwc.git/commitdiff
menu: slightly slide menus opened from buttons
authortokyo4j <hrak1529@gmail.com>
Fri, 6 Dec 2024 04:57:50 +0000 (13:57 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 6 Dec 2024 05:56:26 +0000 (05:56 +0000)
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.

src/action.c

index 9da1b796fb5474044f47f9767eab8b7cc9192465..195a91715d73178b341480e5e7ac28151ca79c23 100644 (file)
@@ -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;
                }
        }