summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1999-02-23 00:43:26 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-02-23 00:43:26 +0000
commit148e7663341edbb31ea03cdb2c82bccf8003ef02 (patch)
tree5e8f927b65b3dee5f54c31cdf365d0c990deb7d9
parentd5aed59bbcefe89a34da745a0f7e2abe7bcdcae6 (diff)
downloadgdk-pixbuf-148e7663341edbb31ea03cdb2c82bccf8003ef02.tar.gz
When sending events to windows with a proxy, set the window field in the
Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkdnd.c (xdnd_send_*): When sending events to windows with a proxy, set the window field in the sent event to the original window, not to the proxy. (This gives consistency with Motif, and also provides information to the destination that it wouldn't have otherwise). * gtk/gtkdnd.c: Fixed some refcount leaks for windows. * gdk/gdkdnd.c (xdnd_send_xevent): When sending Xdnd event to the root window, set the event mask to ButtonPressMask. Hopefully, this should give us compatibility with kfm, if it uses the Qt style of root window drops.
-rw-r--r--ChangeLog17
-rw-r--r--ChangeLog.pre-2-017
-rw-r--r--ChangeLog.pre-2-1017
-rw-r--r--ChangeLog.pre-2-217
-rw-r--r--ChangeLog.pre-2-417
-rw-r--r--ChangeLog.pre-2-617
-rw-r--r--ChangeLog.pre-2-817
-rw-r--r--gdk/gdkdnd.c85
-rw-r--r--gdk/x11/gdkdnd-x11.c85
-rw-r--r--gtk/gtkdnd.c8
10 files changed, 268 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 4990aec03..d16adc671 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdnd.c (xdnd_send_*): When sending events to
+ windows with a proxy, set the window field in the
+ sent event to the original window, not to the proxy.
+ (This gives consistency with Motif, and also provides
+ information to the destination that it wouldn't have
+ otherwise).
+
+ * gtk/gtkdnd.c: Fixed some refcount leaks for windows.
+
+ * gdk/gdkdnd.c (xdnd_send_xevent): When sending
+ Xdnd event to the root window, set the event mask
+ to ButtonPressMask. Hopefully, this should give us
+ compatibility with kfm, if it uses the Qt style
+ of root window drops.
+
Mon Feb 22 08:45:10 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 4990aec03..d16adc671 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,20 @@
+Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdnd.c (xdnd_send_*): When sending events to
+ windows with a proxy, set the window field in the
+ sent event to the original window, not to the proxy.
+ (This gives consistency with Motif, and also provides
+ information to the destination that it wouldn't have
+ otherwise).
+
+ * gtk/gtkdnd.c: Fixed some refcount leaks for windows.
+
+ * gdk/gdkdnd.c (xdnd_send_xevent): When sending
+ Xdnd event to the root window, set the event mask
+ to ButtonPressMask. Hopefully, this should give us
+ compatibility with kfm, if it uses the Qt style
+ of root window drops.
+
Mon Feb 22 08:45:10 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 4990aec03..d16adc671 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,20 @@
+Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdnd.c (xdnd_send_*): When sending events to
+ windows with a proxy, set the window field in the
+ sent event to the original window, not to the proxy.
+ (This gives consistency with Motif, and also provides
+ information to the destination that it wouldn't have
+ otherwise).
+
+ * gtk/gtkdnd.c: Fixed some refcount leaks for windows.
+
+ * gdk/gdkdnd.c (xdnd_send_xevent): When sending
+ Xdnd event to the root window, set the event mask
+ to ButtonPressMask. Hopefully, this should give us
+ compatibility with kfm, if it uses the Qt style
+ of root window drops.
+
Mon Feb 22 08:45:10 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 4990aec03..d16adc671 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,20 @@
+Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdnd.c (xdnd_send_*): When sending events to
+ windows with a proxy, set the window field in the
+ sent event to the original window, not to the proxy.
+ (This gives consistency with Motif, and also provides
+ information to the destination that it wouldn't have
+ otherwise).
+
+ * gtk/gtkdnd.c: Fixed some refcount leaks for windows.
+
+ * gdk/gdkdnd.c (xdnd_send_xevent): When sending
+ Xdnd event to the root window, set the event mask
+ to ButtonPressMask. Hopefully, this should give us
+ compatibility with kfm, if it uses the Qt style
+ of root window drops.
+
Mon Feb 22 08:45:10 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 4990aec03..d16adc671 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,20 @@
+Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdnd.c (xdnd_send_*): When sending events to
+ windows with a proxy, set the window field in the
+ sent event to the original window, not to the proxy.
+ (This gives consistency with Motif, and also provides
+ information to the destination that it wouldn't have
+ otherwise).
+
+ * gtk/gtkdnd.c: Fixed some refcount leaks for windows.
+
+ * gdk/gdkdnd.c (xdnd_send_xevent): When sending
+ Xdnd event to the root window, set the event mask
+ to ButtonPressMask. Hopefully, this should give us
+ compatibility with kfm, if it uses the Qt style
+ of root window drops.
+
Mon Feb 22 08:45:10 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 4990aec03..d16adc671 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,20 @@
+Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdnd.c (xdnd_send_*): When sending events to
+ windows with a proxy, set the window field in the
+ sent event to the original window, not to the proxy.
+ (This gives consistency with Motif, and also provides
+ information to the destination that it wouldn't have
+ otherwise).
+
+ * gtk/gtkdnd.c: Fixed some refcount leaks for windows.
+
+ * gdk/gdkdnd.c (xdnd_send_xevent): When sending
+ Xdnd event to the root window, set the event mask
+ to ButtonPressMask. Hopefully, this should give us
+ compatibility with kfm, if it uses the Qt style
+ of root window drops.
+
Mon Feb 22 08:45:10 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 4990aec03..d16adc671 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,20 @@
+Mon Feb 22 19:06:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdnd.c (xdnd_send_*): When sending events to
+ windows with a proxy, set the window field in the
+ sent event to the original window, not to the proxy.
+ (This gives consistency with Motif, and also provides
+ information to the destination that it wouldn't have
+ otherwise).
+
+ * gtk/gtkdnd.c: Fixed some refcount leaks for windows.
+
+ * gdk/gdkdnd.c (xdnd_send_xevent): When sending
+ Xdnd event to the root window, set the event mask
+ to ButtonPressMask. Hopefully, this should give us
+ compatibility with kfm, if it uses the Qt style
+ of root window drops.
+
Mon Feb 22 08:45:10 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c
index a4244bd35..55bd8b9ab 100644
--- a/gdk/gdkdnd.c
+++ b/gdk/gdkdnd.c
@@ -23,6 +23,8 @@
#include "gdk/gdkprivate.h"
#include "gdk.h"
+#define NEW_DRAGS
+
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum {
@@ -177,16 +179,24 @@ gdk_drag_context_find (gboolean is_source,
{
GList *tmp_list = contexts;
GdkDragContext *context;
+ GdkDragContextPrivate *private;
+ Window context_dest_xid;
while (tmp_list)
{
context = (GdkDragContext *)tmp_list->data;
+ private = (GdkDragContextPrivate *)context;
+
+ context_dest_xid = context->dest_window ?
+ (private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window)) :
+ None;
if ((!context->is_source == !is_source) &&
((source_xid == None) || (context->source_window &&
(GDK_WINDOW_XWINDOW (context->source_window) == source_xid))) &&
- ((dest_xid == None) || (context->dest_window &&
- (GDK_WINDOW_XWINDOW (context->dest_window) == dest_xid))))
+ ((dest_xid == None) || (context_dest_xid == dest_xid)))
return context;
tmp_list = tmp_list->next;
@@ -2059,6 +2069,26 @@ xdnd_set_actions (GdkDragContext *context)
private->xdnd_actions = context->actions;
}
+/*************************************************************
+ * xdnd_send_xevent:
+ * Like gdk_send_event, but if the target is the root
+ * window, sets an event mask of ButtonPressMask, otherwise
+ * an event mask of 0.
+ * arguments:
+ *
+ * results:
+ *************************************************************/
+
+gint
+xdnd_send_xevent (Window window, gboolean propagate,
+ XEvent *event_send)
+{
+ if (window == gdk_root_window)
+ return gdk_send_xevent (window, propagate, ButtonPressMask, event_send);
+ else
+ return gdk_send_xevent (window, propagate, 0, event_send);
+}
+
static void
xdnd_send_enter (GdkDragContext *context)
{
@@ -2068,7 +2098,13 @@ xdnd_send_enter (GdkDragContext *context)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = (3 << 24); /* version */
xev.xclient.data.l[2] = 0;
@@ -2097,8 +2133,8 @@ xdnd_send_enter (GdkDragContext *context)
}
}
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -2113,18 +2149,26 @@ xdnd_send_leave (GdkDragContext *context)
{
XEvent xev;
+ GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
+
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = 0;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -2137,20 +2181,27 @@ xdnd_send_leave (GdkDragContext *context)
static void
xdnd_send_drop (GdkDragContext *context, guint32 time)
{
+ GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
XEvent xev;
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = time;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -2173,15 +2224,21 @@ xdnd_send_motion (GdkDragContext *context,
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = (x_root << 16) | y_root;
xev.xclient.data.l[3] = time;
xev.xclient.data.l[4] = xdnd_action_to_atom (action);
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -3075,8 +3132,8 @@ gdk_drag_status (GdkDragContext *context,
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = xdnd_action_to_atom (action);
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
+ FALSE, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XWINDOW (context->source_window)));
@@ -3146,8 +3203,8 @@ gdk_drop_finish (GdkDragContext *context,
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
+ FALSE, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XWINDOW (context->source_window)));
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index a4244bd35..55bd8b9ab 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -23,6 +23,8 @@
#include "gdk/gdkprivate.h"
#include "gdk.h"
+#define NEW_DRAGS
+
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum {
@@ -177,16 +179,24 @@ gdk_drag_context_find (gboolean is_source,
{
GList *tmp_list = contexts;
GdkDragContext *context;
+ GdkDragContextPrivate *private;
+ Window context_dest_xid;
while (tmp_list)
{
context = (GdkDragContext *)tmp_list->data;
+ private = (GdkDragContextPrivate *)context;
+
+ context_dest_xid = context->dest_window ?
+ (private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window)) :
+ None;
if ((!context->is_source == !is_source) &&
((source_xid == None) || (context->source_window &&
(GDK_WINDOW_XWINDOW (context->source_window) == source_xid))) &&
- ((dest_xid == None) || (context->dest_window &&
- (GDK_WINDOW_XWINDOW (context->dest_window) == dest_xid))))
+ ((dest_xid == None) || (context_dest_xid == dest_xid)))
return context;
tmp_list = tmp_list->next;
@@ -2059,6 +2069,26 @@ xdnd_set_actions (GdkDragContext *context)
private->xdnd_actions = context->actions;
}
+/*************************************************************
+ * xdnd_send_xevent:
+ * Like gdk_send_event, but if the target is the root
+ * window, sets an event mask of ButtonPressMask, otherwise
+ * an event mask of 0.
+ * arguments:
+ *
+ * results:
+ *************************************************************/
+
+gint
+xdnd_send_xevent (Window window, gboolean propagate,
+ XEvent *event_send)
+{
+ if (window == gdk_root_window)
+ return gdk_send_xevent (window, propagate, ButtonPressMask, event_send);
+ else
+ return gdk_send_xevent (window, propagate, 0, event_send);
+}
+
static void
xdnd_send_enter (GdkDragContext *context)
{
@@ -2068,7 +2098,13 @@ xdnd_send_enter (GdkDragContext *context)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = (3 << 24); /* version */
xev.xclient.data.l[2] = 0;
@@ -2097,8 +2133,8 @@ xdnd_send_enter (GdkDragContext *context)
}
}
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -2113,18 +2149,26 @@ xdnd_send_leave (GdkDragContext *context)
{
XEvent xev;
+ GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
+
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = 0;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -2137,20 +2181,27 @@ xdnd_send_leave (GdkDragContext *context)
static void
xdnd_send_drop (GdkDragContext *context, guint32 time)
{
+ GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
XEvent xev;
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = time;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -2173,15 +2224,21 @@ xdnd_send_motion (GdkDragContext *context,
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
xev.xclient.format = 32;
+#ifdef NEW_DRAGS
+ xev.xclient.window = private->dest_xid ?
+ private->dest_xid :
+ GDK_WINDOW_XWINDOW (context->dest_window);
+#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
+#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = (x_root << 16) | y_root;
xev.xclient.data.l[3] = time;
xev.xclient.data.l[4] = xdnd_action_to_atom (action);
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->dest_window),
+ FALSE, &xev))
{
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
@@ -3075,8 +3132,8 @@ gdk_drag_status (GdkDragContext *context,
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = xdnd_action_to_atom (action);
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
+ FALSE, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XWINDOW (context->source_window)));
@@ -3146,8 +3203,8 @@ gdk_drop_finish (GdkDragContext *context,
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- if (!gdk_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
- FALSE, 0, &xev))
+ if (!xdnd_send_xevent (GDK_WINDOW_XWINDOW (context->source_window),
+ FALSE, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XWINDOW (context->source_window)));
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index c82d449f7..55103740a 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1385,6 +1385,9 @@ gtk_drag_dest_motion (GtkWidget *widget,
context->suggested_action,
context->actions, time);
+ if (!site->proxy_window && dest_window)
+ gdk_window_unref (dest_window);
+
selection = gdk_drag_get_selection (info->proxy_source->context);
if (selection &&
selection != gdk_drag_get_selection (info->context))
@@ -1494,7 +1497,7 @@ gtk_drag_dest_drop (GtkWidget *widget,
current_event->dnd.y_root,
&dest_window, &proto);
}
-
+
gdk_drag_motion (info->proxy_source->context,
dest_window, proto,
current_event->dnd.x_root,
@@ -1502,6 +1505,9 @@ gtk_drag_dest_drop (GtkWidget *widget,
context->suggested_action,
context->actions, time);
+ if (!site->proxy_window && dest_window)
+ gdk_window_unref (dest_window);
+
selection = gdk_drag_get_selection (info->proxy_source->context);
if (selection &&
selection != gdk_drag_get_selection (info->context))