Commit 990bddfe authored by Elliot Lee's avatar Elliot Lee

Miguel, try this - I think it should do what you need. Hurry hurry :)

parent 239a12d0
......@@ -1976,6 +1976,7 @@ gdk_event_translate (GdkEvent *event,
event->button.source = GDK_SOURCE_MOUSE;
event->button.deviceid = GDK_CORE_POINTER;
gdk_dnd.last_drop_time = xevent->xbutton.time;
if(gdk_dnd.drag_perhaps)
{
{
......@@ -2806,6 +2807,11 @@ gdk_event_translate (GdkEvent *event,
g_print("GDK_DROP_DATA_AVAIL\n");
#endif
event->dropdataavailable.u.allflags = xevent->xclient.data.l[1];
event->dropdataavailable.timestamp = xevent->xclient.data.l[4];
event->dropdataavailable.coords.x =
xevent->xclient.data.l[3] & 0xffff;
event->dropdataavailable.coords.y =
(xevent->xclient.data.l[3] >> 16) & 0xffff;
if(window
/* No preview of data ATM */
&& event->dropdataavailable.u.flags.isdrop)
......@@ -3769,6 +3775,7 @@ gdk_dnd_drag_end (Window dest,
{
tev.window = (GdkWindow *) wp;
tev.u.flags.delete_data = wp->dnd_drag_destructive_op;
tev.timestamp = gdk_dnd.last_drop_time;
tev.data_type =
gdk_atom_name(wp->dnd_drag_data_type);
......
......@@ -45,7 +45,7 @@ GdkDndGlobals gdk_dnd = {None,None,None,
None,
{0,0},
{0,0}, {0,0},
{0,0,0,0}, NULL, None};
{0,0,0,0}, NULL, None, 0};
gchar *gdk_progname = NULL;
gchar *gdk_progclass = NULL;
gint gdk_error_code;
......
......@@ -165,6 +165,7 @@ struct _GdkDndGlobals {
GdkRectangle dnd_drag_dropzone;
GdkWindowPrivate *real_sw;
Window dnd_drag_curwin;
Time last_drop_time; /* An incredible hack, sosumi miguel */
};
typedef struct _GdkDndGlobals GdkDndGlobals;
......
......@@ -1064,6 +1064,7 @@ struct _GdkEventDragRequest
GdkPoint drop_coords;
gchar *data_type;
guint32 timestamp;
};
struct _GdkEventDragBegin
......@@ -1129,6 +1130,8 @@ struct _GdkEventDropDataAvailable
gchar *data_type; /* MIME type */
gulong data_numbytes;
gpointer data;
guint32 timestamp;
GdkPoint coords;
};
struct _GdkEventClient
......
......@@ -1549,8 +1549,8 @@ gdk_window_dnd_data_set (GdkWindow *window,
(event->dragrequest.drop_coords.y << 16);
else
sev.xclient.data.l[3] = 0;
sev.xclient.data.l[4] = 0;
sev.xclient.data.l[4] = event->dragrequest.timestamp;
if (!gdk_send_xevent (event->dragrequest.requestor, False,
NoEventMask, &sev))
......
......@@ -45,7 +45,7 @@ GdkDndGlobals gdk_dnd = {None,None,None,
None,
{0,0},
{0,0}, {0,0},
{0,0,0,0}, NULL, None};
{0,0,0,0}, NULL, None, 0};
gchar *gdk_progname = NULL;
gchar *gdk_progclass = NULL;
gint gdk_error_code;
......
......@@ -1976,6 +1976,7 @@ gdk_event_translate (GdkEvent *event,
event->button.source = GDK_SOURCE_MOUSE;
event->button.deviceid = GDK_CORE_POINTER;
gdk_dnd.last_drop_time = xevent->xbutton.time;
if(gdk_dnd.drag_perhaps)
{
{
......@@ -2806,6 +2807,11 @@ gdk_event_translate (GdkEvent *event,
g_print("GDK_DROP_DATA_AVAIL\n");
#endif
event->dropdataavailable.u.allflags = xevent->xclient.data.l[1];
event->dropdataavailable.timestamp = xevent->xclient.data.l[4];
event->dropdataavailable.coords.x =
xevent->xclient.data.l[3] & 0xffff;
event->dropdataavailable.coords.y =
(xevent->xclient.data.l[3] >> 16) & 0xffff;
if(window
/* No preview of data ATM */
&& event->dropdataavailable.u.flags.isdrop)
......@@ -3769,6 +3775,7 @@ gdk_dnd_drag_end (Window dest,
{
tev.window = (GdkWindow *) wp;
tev.u.flags.delete_data = wp->dnd_drag_destructive_op;
tev.timestamp = gdk_dnd.last_drop_time;
tev.data_type =
gdk_atom_name(wp->dnd_drag_data_type);
......
......@@ -1549,8 +1549,8 @@ gdk_window_dnd_data_set (GdkWindow *window,
(event->dragrequest.drop_coords.y << 16);
else
sev.xclient.data.l[3] = 0;
sev.xclient.data.l[4] = 0;
sev.xclient.data.l[4] = event->dragrequest.timestamp;
if (!gdk_send_xevent (event->dragrequest.requestor, False,
NoEventMask, &sev))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment