Fixed mouse event boundaries in menus.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2009-08-28 15:33:32 +04:00
parent c2f37224c5
commit a14574d037

View File

@ -474,11 +474,11 @@ menubar_event (Gpm_Event *event, void *data)
/* Else, the mouse operation is on the menus or it is not */
left_x = menubar->menu[menubar->selected]->start_x;
right_x = left_x + menubar->max_entry_len + 4;
right_x = left_x + menubar->max_entry_len + 3;
if (right_x > menubar->widget.cols)
{
left_x = menubar->widget.cols - menubar->max_entry_len - 3;
right_x = menubar->widget.cols - 1;
right_x = menubar->widget.cols;
}
bottom_y = (menubar->menu [menubar->selected])->count + 3;