summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorElliot Lee <sopwith@src.gnome.org>1997-12-18 23:03:26 +0000
committerElliot Lee <sopwith@src.gnome.org>1997-12-18 23:03:26 +0000
commit1cf3f510d1e49bcf26b016d61e42dd51c1d1a42f (patch)
tree0d8579cff94d370c8f616059b913d40d2a3beaee /gdk
parent68245813350c79799556b53baaf15a3c28a55c9a (diff)
downloadgdk-pixbuf-1cf3f510d1e49bcf26b016d61e42dd51c1d1a42f.tar.gz
DnD works again, fixed my own stupidity ;-)
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdk.c18
-rw-r--r--gdk/x11/gdkmain-x11.c18
2 files changed, 26 insertions, 10 deletions
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 3b4d22573..46d512add 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -1958,15 +1958,23 @@ gdk_event_translate (GdkEvent *event,
/* XXX there has to be a better way to do this, perhaps with
XTranslateCoordinates or XQueryTree - I don't know how,
and this sort of works */
- static Window lastwin = None, curwin = None;
+ static Window lastwin = None, curwin = None, twin;
Window childwin = gdk_root_window;
- int x, y;
+ int x, y, ox, oy;
lastwin = curwin;
+ curwin = gdk_root_window;
+ ox = x = xevent->xmotion.x_root;
+ oy = y = xevent->xmotion.y_root;
while(childwin != None)
{
- curwin = childwin;
- XTranslateCoordinates(gdk_display, curwin, childwin,
- x, y, &x, &y, &childwin);
+ ox = x; oy = y;
+ curwin = childwin;
+ XTranslateCoordinates(gdk_display, curwin, curwin,
+ x, y, &x, &y, &childwin);
+ if(childwin != None) {
+ XTranslateCoordinates(gdk_display, curwin, childwin,
+ x, y, &x, &y, &twin);
+ }
}
#ifdef DEBUG_DND
g_print("Drag is now in window %#x, lastwin was %#x\n",
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 3b4d22573..46d512add 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -1958,15 +1958,23 @@ gdk_event_translate (GdkEvent *event,
/* XXX there has to be a better way to do this, perhaps with
XTranslateCoordinates or XQueryTree - I don't know how,
and this sort of works */
- static Window lastwin = None, curwin = None;
+ static Window lastwin = None, curwin = None, twin;
Window childwin = gdk_root_window;
- int x, y;
+ int x, y, ox, oy;
lastwin = curwin;
+ curwin = gdk_root_window;
+ ox = x = xevent->xmotion.x_root;
+ oy = y = xevent->xmotion.y_root;
while(childwin != None)
{
- curwin = childwin;
- XTranslateCoordinates(gdk_display, curwin, childwin,
- x, y, &x, &y, &childwin);
+ ox = x; oy = y;
+ curwin = childwin;
+ XTranslateCoordinates(gdk_display, curwin, curwin,
+ x, y, &x, &y, &childwin);
+ if(childwin != None) {
+ XTranslateCoordinates(gdk_display, curwin, childwin,
+ x, y, &x, &y, &twin);
+ }
}
#ifdef DEBUG_DND
g_print("Drag is now in window %#x, lastwin was %#x\n",