diff --git a/ChangeLog b/ChangeLog index 20a6be25d7..65f6dd7280 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed May 15 18:15:45 2002 Owen Taylor + + * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't + call gdk_pointer_grab() to change the cursor if we've + already ungrabbed on button release / escape. + (#80420, Dave Camp) + Wed May 15 17:12:50 2002 Owen Taylor * gtk/gtktooltips.c: Special case menu items to diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 20a6be25d7..65f6dd7280 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Wed May 15 18:15:45 2002 Owen Taylor + + * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't + call gdk_pointer_grab() to change the cursor if we've + already ungrabbed on button release / escape. + (#80420, Dave Camp) + Wed May 15 17:12:50 2002 Owen Taylor * gtk/gtktooltips.c: Special case menu items to diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 20a6be25d7..65f6dd7280 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Wed May 15 18:15:45 2002 Owen Taylor + + * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't + call gdk_pointer_grab() to change the cursor if we've + already ungrabbed on button release / escape. + (#80420, Dave Camp) + Wed May 15 17:12:50 2002 Owen Taylor * gtk/gtktooltips.c: Special case menu items to diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 20a6be25d7..65f6dd7280 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Wed May 15 18:15:45 2002 Owen Taylor + + * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't + call gdk_pointer_grab() to change the cursor if we've + already ungrabbed on button release / escape. + (#80420, Dave Camp) + Wed May 15 17:12:50 2002 Owen Taylor * gtk/gtktooltips.c: Special case menu items to diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 20a6be25d7..65f6dd7280 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Wed May 15 18:15:45 2002 Owen Taylor + + * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't + call gdk_pointer_grab() to change the cursor if we've + already ungrabbed on button release / escape. + (#80420, Dave Camp) + Wed May 15 17:12:50 2002 Owen Taylor * gtk/gtktooltips.c: Special case menu items to diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 20a6be25d7..65f6dd7280 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Wed May 15 18:15:45 2002 Owen Taylor + + * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't + call gdk_pointer_grab() to change the cursor if we've + already ungrabbed on button release / escape. + (#80420, Dave Camp) + Wed May 15 17:12:50 2002 Owen Taylor * gtk/gtktooltips.c: Special case menu items to diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index ab7b35ef46..0682db2b2c 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -101,6 +101,8 @@ struct _GtkDragSourceInfo guint drop_timeout; /* Timeout for aborting drop */ guint destroy_icon : 1; /* If true, destroy icon_window */ + guint have_grab : 1; /* Do we still have the pointer grab + */ }; struct _GtkDragDestSite @@ -1897,6 +1899,8 @@ gtk_drag_begin (GtkWidget *widget, } } + info->have_grab = TRUE; + return info->context; } @@ -2456,7 +2460,7 @@ _gtk_drag_source_handle_event (GtkWidget *widget, } } } - else + else if (info->have_grab) { cursor = gtk_drag_get_cursor (gtk_widget_get_screen (widget), event->dnd.context->action); @@ -3022,6 +3026,8 @@ gtk_drag_end (GtkDragSourceInfo *info, guint32 time) GtkWidget *source_widget = info->widget; GdkDisplay *display = gtk_widget_get_display (source_widget); + info->have_grab = FALSE; + gdk_display_pointer_ungrab (display, time); gdk_display_keyboard_ungrab (display, time); gtk_grab_remove (info->ipc_widget);