window.c: Don't ungrab input after displaying the menu

We used to ungrab first to stop any existing grab and then grab after
showing the menu. That was broken in c680e90489, which
moved the ungrab down below the grab, and as a result menus are now
shown without a grab.  This commit moves the grab back up.
dev
Kristian Høgsberg 11 years ago
parent b27901c5a7
commit 8ae63851dd
  1. 3
      clients/window.c

@ -4470,6 +4470,8 @@ window_show_menu(struct display *display,
window->x = x;
window->y = y;
input_ungrab(input);
widget_set_redraw_handler(menu->widget, menu_redraw_handler);
widget_set_enter_handler(menu->widget, menu_enter_handler);
widget_set_leave_handler(menu->widget, menu_leave_handler);
@ -4482,7 +4484,6 @@ window_show_menu(struct display *display,
window_schedule_resize(window, frame_width(menu->frame),
frame_height(menu->frame));
input_ungrab(input);
frame_interior(menu->frame, &ix, &iy, NULL, NULL);
wl_shell_surface_set_popup(window->shell_surface, input->seat,
display_get_serial(window->display),

Loading…
Cancel
Save