Skip to content

Commit a74dac1

Browse files
committed
Ticket #4911: Fix horizontal mouse coordinates in menus
Signed-off-by: Egmont Koblinger <[email protected]>
1 parent e496579 commit a74dac1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/widget/menu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,10 +741,10 @@ menubar_mouse_on_menu (const WMenuBar *menubar, int y, int x)
741741
menu = MENU (g_list_nth_data (menubar->menu, menubar->current));
742742
left_x = menu->start_x;
743743
right_x = left_x + menu->max_entry_len + 2;
744-
if (right_x > w->cols)
744+
if (right_x > w->cols - 1)
745745
{
746-
left_x = w->cols - (menu->max_entry_len + 2);
747-
right_x = w->cols;
746+
left_x = w->cols - 1 - (menu->max_entry_len + 2);
747+
right_x = w->cols - 1;
748748
}
749749

750750
bottom_y = g_list_length (menu->entries) + 2; // skip bar and top frame

0 commit comments

Comments
 (0)