-
Bug
-
Resolution: Fixed
-
P2
-
fx2.1
-
win7, MacOS 10.6.8 / 10.7
jdk7
Run attached code snippet on Windows and Mac. It tries to imitate drag event using glass robot by calling
robot.mouseMove(x + 10, y + 10);
robot.mousePress(1);
robot.mouseMove(x + 10 + N, y + 10 + N); // in loop
on Windows this works perfectly showing next events:
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_MOVED, consumed = false, x = 10.0, y = 10.0, button = NONE]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_PRESSED, consumed = false, x = 10.0, y = 10.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_DRAGGED, consumed = false, x = 20.0, y = 20.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = DRAG_DETECTED, consumed = false, x = 20.0, y = 20.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_DRAGGED, consumed = false, x = 25.0, y = 25.0, button = PRIMARY, primaryButtonDown]
on Mac mouse_moved events being produced instead of mouse_dragged:
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_ENTERED, consumed = false, x = 10.0, y = 10.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 10.0, y = 10.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_PRESSED, consumed = false, x = 10.0, y = 10.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 30.0, y = 30.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 35.0, y = 35.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 40.0, y = 40.0, button = NONE, primaryButtonDown]
although dragging "by hands" without robot works correctly.
robot.mouseMove(x + 10, y + 10);
robot.mousePress(1);
robot.mouseMove(x + 10 + N, y + 10 + N); // in loop
on Windows this works perfectly showing next events:
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_MOVED, consumed = false, x = 10.0, y = 10.0, button = NONE]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_PRESSED, consumed = false, x = 10.0, y = 10.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_DRAGGED, consumed = false, x = 20.0, y = 20.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = DRAG_DETECTED, consumed = false, x = 20.0, y = 20.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@13f7175, target = Rectangle@13f7175, eventType = MOUSE_DRAGGED, consumed = false, x = 25.0, y = 25.0, button = PRIMARY, primaryButtonDown]
on Mac mouse_moved events being produced instead of mouse_dragged:
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_ENTERED, consumed = false, x = 10.0, y = 10.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 10.0, y = 10.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_PRESSED, consumed = false, x = 10.0, y = 10.0, button = PRIMARY, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 30.0, y = 30.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 35.0, y = 35.0, button = NONE, primaryButtonDown]
# MouseEvent [source = Rectangle@299320cf, target = Rectangle@299320cf, eventType = MOUSE_MOVED, consumed = false, x = 40.0, y = 40.0, button = NONE, primaryButtonDown]
although dragging "by hands" without robot works correctly.
- relates to
-
JDK-8126817 Glass robot ignores modifier keys
-
- Closed
-