diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2014-04-29 14:47:46 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-04-29 14:47:46 -0700 |
commit | d0b40ed4513a831c6fc0d5cb2751309b13bc8fae (patch) | |
tree | 98016fd27c032b1619fdcede0d0e8272a0dc18eb /desktop-shell | |
parent | 9c60933a13d82ca70f8daa13f882802d5bfbb399 (diff) | |
download | weston-d0b40ed4513a831c6fc0d5cb2751309b13bc8fae.tar.gz |
desktop-shell: Reject window move in common_surface_move()
We move the check for shsurf->grabbed from surface_move() and
surface_touch_move() up top common_surface_move()
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 82d8166a..9340b4ac 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -1436,8 +1436,6 @@ surface_touch_move(struct shell_surface *shsurf, struct weston_seat *seat) if (shsurf->state.fullscreen) return 0; - if (shsurf->grabbed) - return 0; move = malloc(sizeof *move); if (!move) @@ -1522,8 +1520,6 @@ surface_move(struct shell_surface *shsurf, struct weston_seat *seat) if (!shsurf) return -1; - if (shsurf->grabbed) - return 0; if (shsurf->state.fullscreen || shsurf->state.maximized) return 0; @@ -1550,6 +1546,9 @@ common_surface_move(struct wl_resource *resource, struct shell_surface *shsurf = wl_resource_get_user_data(resource); struct weston_surface *surface; + if (shsurf->grabbed) + return; + if (seat->pointer && seat->pointer->focus && seat->pointer->button_count > 0 && |