8159694: HiDPI, Unity, java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java
Reviewed-by: serb
This commit is contained in:
parent
23c6817c1a
commit
c3938ec18b
test/jdk
@ -125,7 +125,6 @@ java/awt/Frame/FrameLocation/FrameLocation.java 8238436 linux-all
|
||||
java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java 8160558 windows-all
|
||||
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion.java 8060176 windows-all,macosx-all
|
||||
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_1.java 8060176 windows-all,macosx-all
|
||||
java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java 8159694 linux-all
|
||||
java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java 8164464 linux-all,macosx-all
|
||||
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.java 8171510 macosx-all
|
||||
javax/swing/dnd/7171812/bug7171812.java 8041447 macosx-all
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,6 +60,7 @@ public class MissedDragExitTest {
|
||||
|
||||
private static void initAndShowUI() {
|
||||
f = new Frame("Test frame");
|
||||
f.setUndecorated(true);
|
||||
f.setBounds(FRAME_LOCATION,FRAME_LOCATION,FRAME_SIZE,FRAME_SIZE);
|
||||
|
||||
final DraggablePanel dragSource = new DraggablePanel();
|
||||
@ -102,7 +103,7 @@ public class MissedDragExitTest {
|
||||
Util.drag(r,
|
||||
new Point(FRAME_LOCATION + FRAME_SIZE / 3, FRAME_LOCATION + FRAME_SIZE / 3),
|
||||
new Point(FRAME_LOCATION + FRAME_SIZE / 3 * 2, FRAME_LOCATION + FRAME_SIZE / 3 * 2),
|
||||
InputEvent.BUTTON1_MASK);
|
||||
InputEvent.BUTTON1_DOWN_MASK);
|
||||
Util.waitForIdle(r);
|
||||
|
||||
if (!dragExitCalled) {
|
||||
|
@ -307,8 +307,13 @@ public final class Util {
|
||||
* {@code InputEvent.BUTTON3_MASK}
|
||||
*/
|
||||
public static void drag(Robot robot, Point startPoint, Point endPoint, int button) {
|
||||
if (!(button == InputEvent.BUTTON1_MASK || button == InputEvent.BUTTON2_MASK
|
||||
|| button == InputEvent.BUTTON3_MASK))
|
||||
if (!(button == InputEvent.BUTTON1_MASK
|
||||
|| button == InputEvent.BUTTON2_MASK
|
||||
|| button == InputEvent.BUTTON3_MASK
|
||||
|| button == InputEvent.BUTTON1_DOWN_MASK
|
||||
|| button == InputEvent.BUTTON2_DOWN_MASK
|
||||
|| button == InputEvent.BUTTON3_DOWN_MASK
|
||||
))
|
||||
{
|
||||
throw new IllegalArgumentException("invalid mouse button");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user