Commit 165ab0c9 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko Committed by Alexander Mikhaylenko

swipe-tracker: Grab widget during the gesture

Signed-off-by: Alexander Mikhaylenko's avatarAlexander Mikhaylenko <alexm@gnome.org>
parent 1d47eeb8
......@@ -145,6 +145,9 @@ reset (HdySwipeTracker *self)
self->cancel_progress = 0;
self->cancelled = FALSE;
if (self->widget)
gtk_grab_remove (self->widget);
}
static void
......@@ -170,6 +173,8 @@ gesture_begin (HdySwipeTracker *self)
event = gtk_get_current_event ();
self->prev_time = gdk_event_get_time (event);
self->state = HDY_SWIPE_TRACKER_STATE_SCROLLING;
gtk_grab_add (self->widget);
}
static void
......@@ -490,6 +495,9 @@ hdy_swipe_tracker_dispose (GObject *object)
{
HdySwipeTracker *self = (HdySwipeTracker *)object;
if (self->widget)
gtk_grab_remove (self->widget);
if (self->touch_gesture)
g_signal_handlers_disconnect_by_data (self->touch_gesture, self);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment