summaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-07-04 01:12:17 -0400
committerKristian Høgsberg <krh@bitplanet.net>2013-07-04 01:12:17 -0400
commit6780073d7815ea92bbe401115824c31ebdcffbd5 (patch)
treedfa3154a5ec74098d22725e4774cf080aa6bbe8f /src/shell.c
parentda751b8f9a16177b56399f10ca193b4c8b746ad8 (diff)
downloadweston-6780073d7815ea92bbe401115824c31ebdcffbd5.tar.gz
weston-6780073d7815ea92bbe401115824c31ebdcffbd5.tar.bz2
weston-6780073d7815ea92bbe401115824c31ebdcffbd5.zip
shell: Always go through end_busy_cursor when ending the busy cursor grab
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shell.c b/src/shell.c
index bbc3d05b..e20004f7 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1294,6 +1294,9 @@ shell_surface_resize(struct wl_client *client, struct wl_resource *resource,
}
static void
+end_busy_cursor(struct shell_surface *shsurf, struct weston_pointer *pointer);
+
+static void
busy_cursor_grab_focus(struct weston_pointer_grab *base)
{
struct shell_grab *grab = (struct shell_grab *) base;
@@ -1305,10 +1308,8 @@ busy_cursor_grab_focus(struct weston_pointer_grab *base)
pointer->x, pointer->y,
&sx, &sy);
- if (!grab->shsurf || grab->shsurf->surface != surface) {
- shell_grab_end(grab);
- free(grab);
- }
+ if (!grab->shsurf || grab->shsurf->surface != surface)
+ end_busy_cursor(grab->shsurf, pointer);
}
static void