DragAndDropContainer and alwaysOnTop dragging


#1

actually i’m using a Component which is a DragAndDropContainer, and i added it to a Window which is always on top document window. when triggering the startDrag (with a image snapshot to drag around) the dragged image actually is correctly redraw all over the desktop… but actually below the alwaysontop window. is this a correct behaviour or i’m forgetting to setup something ?
i’ve looked into the dragdrop class and i can see the addToDesktop and setVisible call for the DragImage, but actually there isn’t any call to toFront or alwaysOnTop… could be a good thing to let the dragger decide (with a added boolean keepDragImageOnTop in startDrag) if the drag could be important and be over all the windows or have to be kept under ?


#2

Good point - I guess the dragged component should be always on top. Can’t think of a reason why it shouldn’t be. I’ll change that.


#3

it shouldn’t be on top if you want drag and drop behave inside a component and you would like to limit drag and drop only into that (preventing it showing over some other dialogs that u want ontop)… maybe :?


#4

not quite sure what you mean, but whether the dragged component is in front of or behind other comps currently makes no difference to whether you can drop onto them. I think it should always be on top.


#5

is drag and drop supported on linux and macosx ? or there are any limitations ?


#6

The internal juce drag-and-drop is the same on all platforms, of course. External drag-and-drop is only on windows + mac.


#7

ok thanx man. so if i would like to drag and drop between 2 juce apps in linux, isn’t supposed to working, right ?


#8

no, that won’t work. They don’t have access to each other’s objects.


#9

yes of course. but if external app dragging is working, then i can simulate drag from within 2 juce apps, the same as simulating drag and drop from a juce app over an external texteditor (string dragging).


#10

Yes, but I’ve not done that for linux. Not sure if it’s even possible on linux, TBH. The whole linux drag/drop/clipboard thing’s a complete shambles.


#11