< prev index next >
test/jdk/java/awt/Window/LocationAtScreenCorner/LocationAtScreenCorner.java
Print this page
rev 60071 : 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI)
Reviewed-by: XXX
*** 1,7 ****
/*
! * Copyright (c) 2018, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2018, 2020, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 30,40 ****
import java.awt.Robot;
/**
* @test
* @key headful
! * @bug 8201364 8232433
* @summary Component.getLocation() should returns correct location if
* Component.setBounds() was ignored by the OS
*/
public final class LocationAtScreenCorner {
--- 30,40 ----
import java.awt.Robot;
/**
* @test
* @key headful
! * @bug 8201364 8232433 8211999
* @summary Component.getLocation() should returns correct location if
* Component.setBounds() was ignored by the OS
*/
public final class LocationAtScreenCorner {
*** 62,73 ****
--- 62,76 ----
// coordinates.
for (GraphicsDevice device : devices) {
Rectangle bounds = device.getDefaultConfiguration().getBounds();
test(robot, frame, bounds.x, bounds.y);
test(robot, frame, bounds.width, bounds.y);
+ test(robot, frame, bounds.x + bounds.width, bounds.y);
test(robot, frame, bounds.x, bounds.height);
+ test(robot, frame, bounds.x, bounds.y + bounds.height);
test(robot, frame, bounds.width, bounds.height);
+ test(robot, frame, bounds.x + bounds.width, bounds.y + bounds.height);
}
frame.dispose();
}
private static void test(Robot robot, Frame frame, int x, int y) {
< prev index next >