On Mon, Jul 16, 2018 at 12:59 PM, Zenja Solaja <solaja@xxxxxxxxx> wrote:
I'm working on a native video editor for Haiku, and have a question
regarding how to cancel an active drag-drop session. From the users point
of view, they can drag any clip either horizontally or vertically. Simple
repositioning of clips is handled without drag/drop, but eventually the
software figures out a complex move is requested and transitions to a
drag/drop mode. I'm using the simple Drag'n'Drop protocol via calling
DragMessage(msg, rect). Until the mouse button is released, the system
draws a rectangle indicating potential drop position.
The problem I have is that I need to cater for the user cancelling a complex
move operation, ie. they revert back to a simple repositioning mode. I'd
like to cancel the current DragMessage session, or alternatively, I'd like
to remove the visible rectangle drawn by the system. Note - the mouse
button is still down.
Does anyone know how to cancel an active drag session before MouseUp()?
If this is not possible, then I'd have to implement my own 'drag/drop'
mechanism and bypass the system one (I'd rather not do that).