Skip to content

Commit

Permalink
make NestedDialogHideTest more reliable
Browse files Browse the repository at this point in the history
currently, if fails on KDE, if multiple workspaces are configured, because mouse cursor happens to be located over 'pin' button in window title bar,
and that hover causes a tooltip to be shown, which blocks mouse clicks
  • Loading branch information
JB-Dmitry committed Sep 20, 2021
1 parent f5c5388 commit ad1595b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/jdk/jb/java/awt/Window/NestedDialogHideTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ private static void initUI() {
button3 = new JButton("Hide");
button3.addActionListener(eee -> d.setVisible(false));
d2.add(button3);
d2.pack();
d2.setLocation(240, 240);
d2.setBounds(240, 240, 200, 200);
d2.setVisible(true);
});
d.add(button2);
d.pack();
d.setLocation(220, 220);
d.setBounds(220, 220, 200, 200);
d.setVisible(true);
d.addComponentListener(new ComponentAdapter() {
@Override
Expand All @@ -77,8 +75,7 @@ public void componentHidden(ComponentEvent e) {
});
});
frame.add(button1);
frame.pack();
frame.setLocation(200, 200);
frame.setBounds(200, 200, 200, 200);
frame.setVisible(true);
}

Expand Down

0 comments on commit ad1595b

Please sign in to comment.