RFR: 8280991: [XWayland] No displayChanged event after setDisplayMode call [v2]

Alexander Zvegintsev azvegint at openjdk.org
Thu Feb 27 01:20:59 UTC 2025


On Thu, 27 Feb 2025 00:56:23 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   NoResizeEventOnDMChangeTest update
>
> test/jdk/java/awt/FullScreen/FullscreenWindowProps/FullscreenWindowProps.java line 58:
> 
>> 56:                 DisplayMode displayMode =
>> 57:                         getGraphicsConfiguration().getDevice().getDisplayMode();
>> 58:                 g.drawString(displayMode.toString(), 100, 100);
> 
> @azvegint 
> This is on an unchanged line. The finally block in the test sets `gd.setFullScreenWindow(null);`
> Is that sufficient or do we need to additionally restore the original display mode in the finally block?

This additional `drawString` was added to make the current display mode more visually distinguishable. It's hard to see just from the window filled with green color.

> The finally block in the test sets gd.setFullScreenWindow(null);
Is that sufficient or do we need to additionally restore the original display mode in the finally block?

Yes, it is sufficient, it is documented here:
https://github.com/openjdk/jdk/blob/78c18cfbcee92ba170810582e238b40b64805e5a/src/java.desktop/share/classes/java/awt/GraphicsDevice.java#L257-L262

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23774#discussion_r1972658030


More information about the client-libs-dev mailing list