Skip to content

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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -339,7 +339,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 @@ -356,10 +356,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");
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 @@ -64,4 +64,11 @@ struct X11GraphicsConfigIDs {
jfieldID bitsPerPixel;
};

#define MAX_DISPLAY_MODES 256
typedef struct {
unsigned int width;
unsigned int height;
jint refresh;
} DisplayMode;

#endif /* _AWT_GRAPHICSENV_H_ */
Loading