Well, I don’t wanna hide the window, just drag it in and out of a pane! It’s such a great feature, it’d be lovely if I could include it in production code…
It’s a tricky issue - how does Juce handle it as you drag a component out of a window? That works really well!
I guess that the component where you start the drag keeps getting mouse events even when you’ve dragged out of it - you don’t get that when you drag in. But someone in the event chain has to know when you start to drag the component in because you are checking somewhere to see if it’s a drop target and if so lighting it up…!
Now you might think that you could override mouseEnter() in the receiving component and then (somehow) check to see if you were in the middle of a drag and drop and if so continue to render the component - but that’s work that everyone would have to do, and worse, there’s this: [quote] When the mouse button is pressed and held down while being moved in
or out of a component, no mouseEnter or mouseExit callbacks are made - only
mouseDrag messages are sent to the component that the mouse was originally
clicked on, until the button is released. [/quote]
Here’s another possible strategy: Somehow that window is rendering itself perfectly well as it’s being dragged over other applications that are not the Demo Application - so why can’t we refuse to hand over control to the demo application until the mouse button is released?
I have some experimental code but couldn’t get dragging back in to really work quite right…