RFR: 8006421: GraphicsConfiguration of a frame is changed when the frame is moved to another screen [v2]
Alexander Zvegintsev
azvegint at openjdk.org
Wed Jun 7 01:02:05 UTC 2023
On Mon, 5 Jun 2023 16:36:42 GMT, Tejesh R <tr at openjdk.org> wrote:
>> When a frame is dragged from one screen to another screen, the `GraphicsConfigurations` may vary depending on screen/monitor. However, transparency has to be maintained since it is expected as it is set. So the fix addresses in maintaining the translucency capability when frame is moved from one screen to another screen. For main screen, translucency is set when `setBackground` is called, but for second screen the same is not taken care. Hence setting of Translucency Capable `GC` is taken care when screen switch happens. The fix handles only for non-opaque windows alone retaining the behavior for opaque windows.
>> The fix is verified in CI for regression check, which is Green.
>
> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>
> Updated fix
test/jdk/java/awt/Multiscreen/WindowGCChangeTest/WindowGCChangeTest.java line 30:
> 28: @summary Tests that GraphicsConfig for invisible (peerless) windows is
> 29: updated after showing the window
> 30: @requires os.family == "windows"
Why are we making it windows only?
It passes on macos and on linux for me.
Could you be more specific about what kind of regression you are seeing on Linux?
test/jdk/java/awt/Window/MultiscreenTransparencyTest.java line 61:
> 59: GraphicsDevice[] gds = ge.getScreenDevices();
> 60:
> 61: if (gds.length != 2) {
Shouldn't it be `> 1`?
To perform the test when 2 or more screens are present.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14246#discussion_r1220388842
PR Review Comment: https://git.openjdk.org/jdk/pull/14246#discussion_r1220620247
More information about the client-libs-dev
mailing list