8305825: getBounds API returns wrong value resulting in multiple Regression Test Failures on Ubuntu 23.04
Reviewed-by: prr, achung, honkar, aivanov
This commit is contained in:
parent
75a7c199d8
commit
632a3c56e0
@ -341,7 +341,8 @@ abstract class XDecoratedPeer extends XWindowPeer {
|
||||
|| ev.get_atom() == XWM.XA_NET_FRAME_EXTENTS.getAtom())
|
||||
{
|
||||
if (XWM.getWMID() != XWM.UNITY_COMPIZ_WM) {
|
||||
if (getMWMDecorTitleProperty().isPresent()) {
|
||||
if ((XWM.getWMID() == XWM.MUTTER_WM && !isTargetUndecorated() && isVisible())
|
||||
|| getMWMDecorTitleProperty().isPresent()) {
|
||||
// Insets might have changed "in-flight" if that property
|
||||
// is present, so we need to get the actual values of
|
||||
// insets from the WM and propagate them through all the
|
||||
|
@ -1369,6 +1369,9 @@ final class XWM
|
||||
case UNITY_COMPIZ_WM:
|
||||
res = new Insets(28, 1, 1, 1);
|
||||
break;
|
||||
case MUTTER_WM:
|
||||
res = new Insets(37, 0, 0, 0);
|
||||
break;
|
||||
case MOTIF_WM:
|
||||
case OPENLOOK_WM:
|
||||
default:
|
||||
@ -1380,6 +1383,7 @@ final class XWM
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some buggy WMs ignore window gravity when processing
|
||||
* ConfigureRequest and position window as if the gravity is Static.
|
||||
|
@ -458,6 +458,7 @@ java/awt/Graphics2D/DrawString/RotTransText.java 8316878 linux-all
|
||||
java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java 8257529 windows-x64
|
||||
java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeForModalDialogTest/ConsumeForModalDialogTest.java 8302787 windows-all
|
||||
java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedTest.java 8302787 windows-all
|
||||
java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeNextMnemonicKeyTypedTest.java 8321303 linux-all
|
||||
|
||||
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java 8225787 linux-x64
|
||||
java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 8266243 macosx-aarch64
|
||||
@ -650,6 +651,7 @@ javax/sound/sampled/Clip/ClipIsRunningAfterStop.java 8307574 linux-x64
|
||||
|
||||
javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java 8233177 linux-all,windows-all
|
||||
|
||||
javax/swing/JFrame/MaximizeWindowTest.java 8321289 linux-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedTranslucentPerPixelTranslucentGradient.java 8233582 linux-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedPerPixelTranslucentGradient.java 8233582 linux-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java 8194128 macosx-all
|
||||
@ -682,9 +684,6 @@ sanity/client/SwingSet/src/EditorPaneDemoTest.java 8212240 linux-x64
|
||||
|
||||
# jdk_swing Ubuntu 23.04 specific
|
||||
|
||||
javax/swing/JTree/8003400/Test8003400.java 8309734 linux-all
|
||||
javax/swing/JTable/7124218/SelectEditTableCell.java 8309734 linux-all
|
||||
javax/swing/JFileChooser/JFileChooserSetLocationTest.java 8309734 linux-all
|
||||
javax/swing/JComboBox/TestComboBoxComponentRendering.java 8309734 linux-all
|
||||
|
||||
############################################################################
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2023, 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
|
||||
@ -54,12 +54,11 @@ import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
public class NestedModalDialogTest {
|
||||
private static Frame frame;
|
||||
private static StartFrame frame;
|
||||
private static IntermediateDialog interDiag;
|
||||
private static TextDialog txtDiag;
|
||||
|
||||
// Global variables so the robot thread can locate things.
|
||||
private static Button[] robot_button = new Button[2];
|
||||
private static TextField robot_text = null;
|
||||
private static Robot robot = null;
|
||||
|
||||
@ -78,6 +77,9 @@ public class NestedModalDialogTest {
|
||||
}
|
||||
|
||||
private static void clickOnComp(Component comp) {
|
||||
robot.waitForIdle();
|
||||
robot.delay(1000);
|
||||
|
||||
Rectangle bounds = new Rectangle(comp.getLocationOnScreen(), comp.getSize());
|
||||
robot.mouseMove(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2);
|
||||
robot.waitForIdle();
|
||||
@ -94,11 +96,11 @@ public class NestedModalDialogTest {
|
||||
// launch first frame with firstButton
|
||||
frame = new StartFrame();
|
||||
blockTillDisplayed(frame);
|
||||
clickOnComp(robot_button[0]);
|
||||
clickOnComp(frame.button);
|
||||
|
||||
// Dialog must be created and onscreen before we proceed.
|
||||
blockTillDisplayed(interDiag);
|
||||
clickOnComp(robot_button[1]);
|
||||
clickOnComp(interDiag.button);
|
||||
|
||||
// Again, the Dialog must be created and onscreen before we proceed.
|
||||
blockTillDisplayed(robot_text);
|
||||
@ -144,6 +146,8 @@ public class NestedModalDialogTest {
|
||||
*/
|
||||
class StartFrame extends Frame {
|
||||
|
||||
public volatile Button button;
|
||||
|
||||
/**
|
||||
* Constructs a new instance.
|
||||
*/
|
||||
@ -168,7 +172,7 @@ public class NestedModalDialogTest {
|
||||
pan.add(but);
|
||||
add(pan);
|
||||
setVisible(true);
|
||||
robot_button[0] = but;
|
||||
button = but;
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,6 +181,7 @@ public class NestedModalDialogTest {
|
||||
class IntermediateDialog extends Dialog {
|
||||
|
||||
Dialog m_parent;
|
||||
public volatile Button button;
|
||||
|
||||
public IntermediateDialog(Frame parent) {
|
||||
super(parent, "Intermediate Modal", true /*Modal*/);
|
||||
@ -193,9 +198,7 @@ public class NestedModalDialogTest {
|
||||
pan.add(but);
|
||||
add(pan);
|
||||
pack();
|
||||
|
||||
// The robot needs to know about us, so set global
|
||||
robot_button[1] = but;
|
||||
button = but;
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,12 +218,12 @@ public class NestedModalDialogTest {
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws RuntimeException, Exception {
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
new NestedModalDialogTest().testModalDialogs();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("NestedModalDialogTest object creation "
|
||||
+ "failed");
|
||||
+ "failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2023, 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
|
||||
@ -64,6 +64,7 @@ public class OwnedWindowFocusIMECrashTest {
|
||||
window.setVisible(true);
|
||||
|
||||
Util.waitForIdle(robot);
|
||||
robot.delay(1000);
|
||||
|
||||
test();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2023, 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
|
||||
@ -120,6 +120,7 @@ public class MultiResolutionSplashTest {
|
||||
static void testFocus() throws Exception {
|
||||
|
||||
Robot robot = new Robot();
|
||||
robot.setAutoWaitForIdle(true);
|
||||
robot.setAutoDelay(50);
|
||||
|
||||
Frame frame = new Frame();
|
||||
@ -130,6 +131,7 @@ public class MultiResolutionSplashTest {
|
||||
frame.add(textField);
|
||||
frame.setVisible(true);
|
||||
robot.waitForIdle();
|
||||
robot.delay(1000);
|
||||
|
||||
robot.keyPress(KeyEvent.VK_A);
|
||||
robot.keyRelease(KeyEvent.VK_A);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2023, 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
|
||||
@ -83,6 +83,7 @@ public class DefaultButtonTest {
|
||||
|
||||
public void runTest() throws Exception {
|
||||
Robot robot = new Robot();
|
||||
robot.setAutoWaitForIdle(true);
|
||||
robot.setAutoDelay(100);
|
||||
for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
|
||||
try {
|
||||
@ -100,6 +101,8 @@ public class DefaultButtonTest {
|
||||
createUI();
|
||||
});
|
||||
robot.waitForIdle();
|
||||
robot.delay(1000);
|
||||
|
||||
robot.keyPress(KeyEvent.VK_ENTER);
|
||||
robot.keyRelease(KeyEvent.VK_ENTER);
|
||||
robot.waitForIdle();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2023, 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
|
||||
@ -109,6 +109,10 @@ public class Test8003400 {
|
||||
|
||||
Robot robot = new Robot();
|
||||
robot.setAutoDelay(100);
|
||||
robot.setAutoWaitForIdle(true);
|
||||
robot.waitForIdle();
|
||||
robot.delay(500);
|
||||
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
point = tree.getLocationOnScreen();
|
||||
rect = tree.getBounds();
|
||||
|
Loading…
x
Reference in New Issue
Block a user