From 6a5d4243ce7b5fe1a41ad12a5420f66e87413b72 Mon Sep 17 00:00:00 2001 From: Egmont Koblinger Date: Sun, 8 Sep 2019 11:38:51 +0300 Subject: [PATCH] Ticket #4013: menubar: fix mouse click coordinate. In the menu bar, click on the space character immediately before the "File" label. Actual: The "Left" menu opens. Expected: The "File" menu should open, since when clicking on "File", this space character on its left is also highlighted. Signed-off-by: Andrew Borodin --- lib/widget/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widget/menu.c b/lib/widget/menu.c index e75f0738e..b7476b62b 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -692,7 +692,7 @@ menubar_get_menu_by_x_coord (const WMenuBar * menubar, int x) GList *menu; for (i = 0, menu = menubar->menu; - menu != NULL && x > MENU (menu->data)->start_x; i++, menu = g_list_next (menu)) + menu != NULL && x >= MENU (menu->data)->start_x; i++, menu = g_list_next (menu)) ; /* Don't set the invalid value -1 */