Hi,

I'm working with XDND Protocol and I need your help. My goal is collecting
dnd data as soon as dnd starts and not when mouse pointer enters my X
Window.

Now I'm able to know when a drag and drop start playing with XdndSelection.
To collect dnd data I've used a fake X window that appears as soon as
possible, and hides it self as soon as possible.

It works but there are some problems.

Sometimes it is required an extra movement to collect the data. In fact I
show the  fake X window after a 200ms timeout, and if the mouse move
(without button releasing) is shorter than 200ms then the fake window is
shown but xdndenter and xdndposition is not sent. Now I thought: «I can use
XWarpPointer to make a fake movement». But if I don't use another timeout it
doesn't work.

Ah, I use XMoveResizeWindow to show/hide the fake x window.

Then, summarizing:
XMoveResizeWindow...
XSync(dpy, False)

XWarpPointer(dpy, root, none, ...., 0, 0)
XFlush(dpy)

This code doesn't work!

Instead this code work:
XMoveResizeWindow...

wait 50 ms

XWarpPointer(dpy, root, none, ...., 0, 0)
XFlush(dpy)

Can someone help me? Why i need the timeout to make it works?

Thanks in advance.

-- 
Andrea Azzarone
http://www.ubuntusecrets.it
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to