diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 14:28:58 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 14:28:58 -0500 |
commit | 27ff086b8edb6387c8710013a41ce631babc3e1a (patch) | |
tree | 205635a34ba62d0a61e025d66a201d13deaee721 | |
parent | 5e41f0975220b9b76baf8a4a33dfe8d8ea4b1bf7 (diff) |
window: Break widget grab before shell surface move or grab
-rw-r--r-- | clients/window.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c index 67e8dd0..c81aed3 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1365,6 +1365,12 @@ window_menu_func(struct window *window, int index, void *data) } } +static void +break_grab(struct window *window) +{ + window->focus_widget = NULL; + window->widget_grab_button = 0; +} static void input_handle_button(void *data, @@ -1392,6 +1398,7 @@ input_handle_button(void *data, if (!window->shell_surface) break; input_set_pointer_image(input, time, POINTER_DRAGGING); + break_grab(window); wl_shell_surface_move(window->shell_surface, input_device, time); break; @@ -1405,6 +1412,7 @@ input_handle_button(void *data, case WINDOW_RESIZING_BOTTOM_RIGHT: if (!window->shell_surface) break; + break_grab(window); wl_shell_surface_resize(window->shell_surface, input_device, time, location); |