Ticket #4013: mc-4013-menu-bar-click.patch

File mc-4013-menu-bar-click.patch, 510 bytes (added by egmont, 5 years ago)

Off by one fix

  • lib/widget/menu.c

    diff --git a/lib/widget/menu.c b/lib/widget/menu.c
    index e75f0738e..b7476b62b 100644
    a b menubar_get_menu_by_x_coord (const WMenuBar * menubar, int x) 
    692692    GList *menu; 
    693693 
    694694    for (i = 0, menu = menubar->menu; 
    695          menu != NULL && x > MENU (menu->data)->start_x; i++, menu = g_list_next (menu)) 
     695         menu != NULL && x >= MENU (menu->data)->start_x; i++, menu = g_list_next (menu)) 
    696696        ; 
    697697 
    698698    /* Don't set the invalid value -1 */