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 <aborodin@vmail.ru>
This commit is contained in:
Egmont Koblinger 2019-09-08 11:38:51 +03:00 committed by Andrew Borodin
parent 37bea39742
commit 6a5d4243ce
1 changed files with 1 additions and 1 deletions

View File

@ -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 */