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:26:45 +00:00
committed by Owen Taylor
parent ea696a2362
commit 806bb88530
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

@@ -102,6 +102,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
@@ -1879,6 +1881,8 @@ gtk_drag_begin (GtkWidget *widget,
}
}
info->have_grab = TRUE;
return info->context;
}
@@ -2431,7 +2435,7 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
}
}
}
else
else if (info->have_grab)
{
cursor = gtk_drag_get_cursor (event->dnd.context->action);
if (info->cursor != cursor)
@@ -2989,6 +2993,8 @@ gtk_drag_end (GtkDragSourceInfo *info, guint32 time)
GdkEvent send_event;
GtkWidget *source_widget = info->widget;
info->have_grab = FALSE;
gdk_pointer_ungrab (time);
gdk_keyboard_ungrab (time);