Another fix for #164884.

2006-07-18  Kristian Rietveld  <kris@imendio.com>

	Another fix for #164884.

	* gtk/gtktreeprivate.h: add in_grab field.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): only save press
	to possibly begin a drag when there's no grab pending,
	(gtk_tree_view_grab_notify): toggle in_grab field.
This commit is contained in:
Kristian Rietveld 2006-07-18 12:33:25 +00:00 committed by Kristian Rietveld
parent 6ca1b1e685
commit 61f4d77d55
4 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,13 @@
2006-07-18 Kristian Rietveld <kris@imendio.com>
Another fix for #164884.
* gtk/gtktreeprivate.h: add in_grab field.
* gtk/gtktreeview.c (gtk_tree_view_button_press): only save press
to possibly begin a drag when there's no grab pending,
(gtk_tree_view_grab_notify): toggle in_grab field.
2006-07-18 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_realize): use MAX

View File

@ -1,3 +1,13 @@
2006-07-18 Kristian Rietveld <kris@imendio.com>
Another fix for #164884.
* gtk/gtktreeprivate.h: add in_grab field.
* gtk/gtktreeview.c (gtk_tree_view_button_press): only save press
to possibly begin a drag when there's no grab pending,
(gtk_tree_view_grab_notify): toggle in_grab field.
2006-07-18 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_realize): use MAX

View File

@ -231,6 +231,8 @@ struct _GtkTreeViewPrivate
guint rubber_banding_enable : 1;
guint in_grab : 1;
/* Auto expand/collapse timeout in hover mode */
guint auto_expand_timeout;

View File

@ -2613,6 +2613,7 @@ gtk_tree_view_button_press (GtkWidget *widget,
/* Save press to possibly begin a drag
*/
if (!column_handled_click &&
!tree_view->priv->in_grab &&
tree_view->priv->pressed_button < 0)
{
tree_view->priv->pressed_button = event->button;
@ -14513,6 +14514,8 @@ gtk_tree_view_grab_notify (GtkWidget *widget,
{
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
tree_view->priv->in_grab = !was_grabbed;
if (!was_grabbed)
tree_view->priv->pressed_button = -1;
}