mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
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:
@ -1533,6 +1533,20 @@ sp_multi_paned_pan_gesture_drag_begin (SpMultiPaned *self,
|
|||||||
priv->drag_begin = child;
|
priv->drag_begin = child;
|
||||||
break;
|
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
|
* 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))
|
if (IS_HORIZONTAL (priv->orientation))
|
||||||
priv->drag_begin_position = priv->drag_begin->alloc.width;
|
priv->drag_begin_position = priv->drag_begin->alloc.width;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user