Skip to content

8354415: [Ubuntu25.04] api/java_awt/GraphicsDevice/indexTGF.html#SetDisplayMode - setDisplayMode_REFRESH_RATE_UNKNOWN fails: Height is different on vnc #26268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ depth, getConfigColormap(0, screen),

private static native void enterFullScreenExclusive(long window);
private static native void exitFullScreenExclusive(long window);
private static native boolean initXrandrExtension();
private static native boolean initXrandrExtension(boolean useOldConfigDisplayMode);
private static native DisplayMode getCurrentDisplayMode(int screen);
private static native void enumDisplayModes(int screen,
ArrayList<DisplayMode> modes);
Expand All @@ -350,10 +350,11 @@ private static native void configDisplayMode(int screen,
*/
private static synchronized boolean isXrandrExtensionSupported() {
if (xrandrExtSupported == null) {
xrandrExtSupported =
Boolean.valueOf(initXrandrExtension());
boolean useOldConfigDisplayMode =
Boolean.getBoolean("awt.x11useOldConfigDisplayMode");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess the idea of this property is to share it to the ppl as a workaround in case some errors will occur? Then the CSR might be needed for it. The better name might be: "awt.x11.EnableXrandrDisplayModes"=true.

xrandrExtSupported = initXrandrExtension(useOldConfigDisplayMode);
}
return xrandrExtSupported.booleanValue();
return xrandrExtSupported;
}

@Override
Expand Down
7 changes: 7 additions & 0 deletions src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,11 @@ struct X11GraphicsConfigIDs {
jfieldID bitsPerPixel;
};

#define MAX_DISPLAY_MODES 256
Copy link
Contributor

@honkar-jdk honkar-jdk Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File requires copyright year update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be handled as a batch copyright year update.

typedef struct {
unsigned int width;
unsigned int height;
jint refresh;
} DisplayMode;

#endif /* _AWT_GRAPHICSENV_H_ */
Loading