Hi,<div><br></div><div>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.</div><div><br></div><div>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. </div>
<div><br></div><div>It works but there are some problems.</div><div><br></div><div>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.</div>
<div><br></div><div>Ah, I use XMoveResizeWindow to show/hide the fake x window.</div><div><br></div><div>Then, summarizing:</div><div>XMoveResizeWindow...</div><div>XSync(dpy, False)</div><div><br></div><div>XWarpPointer(dpy, root, none, ...., 0, 0)</div>
<div>XFlush(dpy)</div><div><br></div><div>This code doesn't work!</div><div><br></div><div>Instead this code work:</div><div><div>XMoveResizeWindow...</div><div><br></div><div>wait 50 ms</div><div><br></div><div>XWarpPointer(dpy, root, none, ...., 0, 0)</div>
<div>XFlush(dpy)</div></div><div><br></div><div>Can someone help me? Why i need the timeout to make it works?</div><div><br></div><div>Thanks in advance.</div><div><div><br></div>-- <br>Andrea Azzarone<div><a href="http://www.ubuntusecrets.it" target="_blank">http://www.ubuntusecrets.it</a></div>
<br>
</div>