Don't call gdk_pointer_grab() to change the cursor if we've already

Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>

        * 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)
This commit is contained in:
Owen Taylor 2002-05-15 22:27:42 +00:00 committed by Owen Taylor
parent 70d78734c5
commit f642876f0c
7 changed files with 49 additions and 1 deletions

View File

@ -1,3 +1,10 @@
Wed May 15 18:15:45 2002 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
* gtk/gtktooltips.c: Special case menu items to

View File

@ -1,3 +1,10 @@
Wed May 15 18:15:45 2002 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
* gtk/gtktooltips.c: Special case menu items to

View File

@ -1,3 +1,10 @@
Wed May 15 18:15:45 2002 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
* gtk/gtktooltips.c: Special case menu items to

View File

@ -1,3 +1,10 @@
Wed May 15 18:15:45 2002 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
* gtk/gtktooltips.c: Special case menu items to

View File

@ -1,3 +1,10 @@
Wed May 15 18:15:45 2002 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
* gtk/gtktooltips.c: Special case menu items to

View File

@ -1,3 +1,10 @@
Wed May 15 18:15:45 2002 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
* gtk/gtktooltips.c: Special case menu items to

View File

@ -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);