summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-10-28 22:06:11 -0700
committerKristian Høgsberg <krh@bitplanet.net>2013-10-28 22:06:11 -0700
commit8ae63851dd57ee448d3d8897dca74d094d3f0cad (patch)
treeef04fdff69871a256395b0561312c73f6ed1b2ea /clients
parentb27901c5a7737ddc9272f8bf7d16902abf9184e6 (diff)
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 c680e904897dfb19331f8f296ab, 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.
Diffstat (limited to 'clients')
-rw-r--r--clients/window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/window.c b/clients/window.c
index 331569a0..e9acacfe 100644
--- a/clients/window.c
+++ b/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),