|
The behavior that has been implemented as a patch to the bug originally
reported in this thread is counterintuitive either. Now NEWT (NewtCanvasAWT)
produces the following events when dragging the mouse so that it exits
the window, then enters again, and finally release the button.
PRESS, DRAG+, EXIT, (nothing while dragging outside), ENTER, MOVE+, RELEASE
So when the user starts dragging a scrollbar handle for example, when the
mouse exits the window, the dragging operation is interrupted and the user
has to start anew. This is in contrast to what users are used to when dragging,
especially when dragging scrollbar handles.
In contrast, AWT (GLCanvas) produces the following:
PRESS, DRAG+, EXIT, DRAG+ (while outside), ENTER, DRAG+, RELEASE
With this series of events, the dragging continues, regardless the mouse
being either inside or outside of the window.
I further noticed that NEWT (NewtCanvasAWT) reports EXIT twice, when
the user releases the button outside the window after a drag operation,
the RELEASE event is not reported at all:
PRESS, DRAG+, EXIT, (nothing while dragging outside), EXIT
AWT (GLCanvas) correctly reports:
PRESS, DRAG+, EXIT, DRAG+ (while outside), RELEASE
It would be nice, if AWT and NEWT would behave consistently, and that DRAG
would also be reported while dragging outside.
The event listeners I used here are implemented using the newt classes, and
wrapped in AWTMouse/KeyAdapter for the AWT case. I'm under
Ubuntu 12.10 (64bit), latest JGOL release, OpenJDK 7.
|