diff options
author | Elliot Lee <sopwith@src.gnome.org> | 1998-03-11 23:12:25 +0000 |
---|---|---|
committer | Elliot Lee <sopwith@src.gnome.org> | 1998-03-11 23:12:25 +0000 |
commit | 093dfedf74d607085b163bd254dea8682d0ba774 (patch) | |
tree | 02bd1e096d859d085d37c607857fe9e00c70884c | |
parent | 48a15b7349af2e5ac62005f5bddd915fce6d6853 (diff) | |
download | gdk-pixbuf-093dfedf74d607085b163bd254dea8682d0ba774.tar.gz |
Bug fixes/improvements to the motion event eating for Dnd
-rw-r--r-- | gdk/gdk.c | 7 | ||||
-rw-r--r-- | gdk/gdkwindow.c | 3 | ||||
-rw-r--r-- | gdk/x11/gdkmain-x11.c | 7 | ||||
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 3 | ||||
-rw-r--r-- | gtk/testgtk.c | 1 | ||||
-rw-r--r-- | tests/testgtk.c | 1 |
6 files changed, 16 insertions, 6 deletions
@@ -1671,10 +1671,12 @@ gdk_event_translate (GdkEvent *event, #endif gint return_val; - /* Are static variables used for this purpose thread-safe? */ - return_val = FALSE; + /* We need to play catch-up with the dnd motion events */ + if(gdk_dnd.drag_really && xevent->type == MotionNotify) + while (XCheckTypedEvent(xevent->xany.display,MotionNotify,xevent)); + /* Find the GdkWindow that this event occurred in. * All events occur in some GdkWindow (otherwise, why * would we be receiving them). It really is an error @@ -2030,7 +2032,6 @@ gdk_event_translate (GdkEvent *event, case MotionNotify: /* Print debugging info. */ - while (XCheckTypedEvent(xevent->xmotion.display,xevent->type,xevent)); GDK_NOTE (EVENTS, g_print ("motion notify:\t\twindow: %ld x,y: %d %d hint: %s d:%d r%d\n", xevent->xmotion.window - base_id, diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index b95135cf3..7cbaf4b60 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -1367,6 +1367,9 @@ gdk_window_shape_combine_mask (GdkWindow *window, g_return_if_fail (window != NULL); + /* This is needed, according to raster */ + gdk_window_set_override_redirect(window, TRUE); + window_private = (GdkWindowPrivate*) window; if (window_private->destroyed) return; diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index e38fd09d3..3e203cab2 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -1671,10 +1671,12 @@ gdk_event_translate (GdkEvent *event, #endif gint return_val; - /* Are static variables used for this purpose thread-safe? */ - return_val = FALSE; + /* We need to play catch-up with the dnd motion events */ + if(gdk_dnd.drag_really && xevent->type == MotionNotify) + while (XCheckTypedEvent(xevent->xany.display,MotionNotify,xevent)); + /* Find the GdkWindow that this event occurred in. * All events occur in some GdkWindow (otherwise, why * would we be receiving them). It really is an error @@ -2030,7 +2032,6 @@ gdk_event_translate (GdkEvent *event, case MotionNotify: /* Print debugging info. */ - while (XCheckTypedEvent(xevent->xmotion.display,xevent->type,xevent)); GDK_NOTE (EVENTS, g_print ("motion notify:\t\twindow: %ld x,y: %d %d hint: %s d:%d r%d\n", xevent->xmotion.window - base_id, diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index b95135cf3..7cbaf4b60 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -1367,6 +1367,9 @@ gdk_window_shape_combine_mask (GdkWindow *window, g_return_if_fail (window != NULL); + /* This is needed, according to raster */ + gdk_window_set_override_redirect(window, TRUE); + window_private = (GdkWindowPrivate*) window; if (window_private->destroyed) return; diff --git a/gtk/testgtk.c b/gtk/testgtk.c index 486931aba..e020e3b49 100644 --- a/gtk/testgtk.c +++ b/gtk/testgtk.c @@ -4086,6 +4086,7 @@ create_dnd () if (!window) { GdkPoint hotspot = {5,5}; + gdk_dnd_set_drag_shape(modeller->window, &hotspot, rings->window, diff --git a/tests/testgtk.c b/tests/testgtk.c index 486931aba..e020e3b49 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -4086,6 +4086,7 @@ create_dnd () if (!window) { GdkPoint hotspot = {5,5}; + gdk_dnd_set_drag_shape(modeller->window, &hotspot, rings->window, |