Thread Previous • Date Previous • Date Next • Thread Next |
On 08/29/2011 10:11 AM, Andrea Azzarone wrote:
Hi all, I need your help. Some time ago I added to Unity code the DNDCollectionWindow class. DNDCollectionWindow is a X Window whose only goal is to collect drag and drop data, as soon as possible and not when the mouse pointer enters the launcher X window (DBO idea). You know, in X Window System there are too many times where other clients don’t know whats going on!! Well it works well most of the time but there are two evil (at least evil for me!) problems. 1) We start to create the DNDColletionWindow about 200ms after the starting of the dnd. If the mouse move (without the releasing) is shorter than 200ms the DNDCollectionWindow will be create but no XdndEnter (or XdndPosition) event is received. Well we could use XWarpPointer to trigger a fake mouse movement (when we are sure that the dnd collection window is really onscreen). It works well.
Im not sure I understand your problem here. Are you saying that there is a problem where the DND lasts shorter than the amount of time it takes to get the collection window up and thus it gets stuck on screen?
2) What happens if the mouse button is released while the DNDCollectionWindow is still onscreen (i think that nux uses XMoveResizeWindow)? Well the DNDCollectionWindow receive the XdndDrop event. Maybe forwarding xdnd events could be a soultion but its fu**ing diffcult to do and prones to errors.
Can I see your patch? I already had to write code that enables us to pick out windows in X for DND, we probably can adapt this to doing selection of a proxy window too.
I have a patch but it doesn't works every single time (90?). So we can: A) Fix problem 1 and discard problem 2 B) Discard problem 1 (the problem 2 is no longer present so...) C) Revert the DNDCollectionWindow. In fact it improves the desing but it could damage the usability.
Thread Previous • Date Previous • Date Next • Thread Next |