multi-paned: only mark position if sequence is accepted

This fixes a bug where any time we touch the adjacent scrollbar,
the position of the paned gets set.
This commit is contained in:
Christian Hergert
2016-09-30 17:11:29 -07:00
parent 76b92cec99
commit 5adb7d6d2c

View File

@ -1533,6 +1533,20 @@ sp_multi_paned_pan_gesture_drag_begin (SpMultiPaned *self,
priv->drag_begin = child;
break;
}
}
if (priv->drag_begin == NULL)
{
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
return;
}
for (i = 0; i < priv->children->len; i++)
{
SpMultiPanedChild *child = &g_array_index (priv->children, SpMultiPanedChild, i);
if (child->handle == event->any.window)
break;
/*
* We want to make any child before the drag child "sticky" so that it
@ -1549,12 +1563,6 @@ sp_multi_paned_pan_gesture_drag_begin (SpMultiPaned *self,
}
}
if (priv->drag_begin == NULL)
{
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
return;
}
if (IS_HORIZONTAL (priv->orientation))
priv->drag_begin_position = priv->drag_begin->alloc.width;
else