diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-07-20 04:48:15 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-07-20 04:48:15 +0000 |
commit | c506c1954ade62fcf8fdcf6f8699ff171ffb9dfb (patch) | |
tree | 7e61d5184802ba1b40abd020771b63d6ae1526e6 /gtk | |
parent | 838497e8ace146c3a7b98ca6d71cacac8e684fa1 (diff) | |
download | gtk+-c506c1954ade62fcf8fdcf6f8699ff171ffb9dfb.tar.gz |
Set drag_pos before grabbing the focus, since we may reenter into
Tue Jul 20 00:45:38 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeview.c (gtk_tree_view_button_press): Set drag_pos
before grabbing the focus, since we may reenter into
gtk_tree_view_motion_resize_column() which requires drag_pos
to be set. (#147913, Guilherme Salgado, patch by John Finlay)
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtktreeview.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 0c3c9edd87..c7a3bc78e1 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -2445,11 +2445,12 @@ gtk_tree_view_button_press (GtkWidget *widget, 0, 0, NULL, NULL, drag_data); + tree_view->priv->drag_pos = i; + tree_view->priv->x_drag = column->button->allocation.x + (rtl ? 0 : column->button->allocation.width); + if (!GTK_WIDGET_HAS_FOCUS (widget)) gtk_widget_grab_focus (widget); - tree_view->priv->drag_pos = i; - tree_view->priv->x_drag = column->button->allocation.x + (rtl ? 0 : column->button->allocation.width); return TRUE; } } |