Skip to content

Commit 6f6974f

Browse files
committed
8354415: [Ubuntu25.04] api/java_awt/GraphicsDevice/indexTGF.html#SetDisplayMode - setDisplayMode_REFRESH_RATE_UNKNOWN fails: Height is different on vnc
8362390: AIX make fails in awt_GraphicsEnv.c Reviewed-by: mbaesken Backport-of: 18c2e40de75f974858aeb453892e4c7c8d5aa90e
1 parent 833c61d commit 6f6974f

File tree

3 files changed

+354
-8
lines changed

3 files changed

+354
-8
lines changed

src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ depth, getConfigColormap(0, screen),
339339

340340
private static native void enterFullScreenExclusive(long window);
341341
private static native void exitFullScreenExclusive(long window);
342-
private static native boolean initXrandrExtension();
342+
private static native boolean initXrandrExtension(boolean useOldConfigDisplayMode);
343343
private static native DisplayMode getCurrentDisplayMode(int screen);
344344
private static native void enumDisplayModes(int screen,
345345
ArrayList<DisplayMode> modes);
@@ -356,10 +356,11 @@ private static native void configDisplayMode(int screen,
356356
*/
357357
private static synchronized boolean isXrandrExtensionSupported() {
358358
if (xrandrExtSupported == null) {
359-
xrandrExtSupported =
360-
Boolean.valueOf(initXrandrExtension());
359+
boolean useOldConfigDisplayMode =
360+
Boolean.getBoolean("awt.x11useOldConfigDisplayMode");
361+
xrandrExtSupported = initXrandrExtension(useOldConfigDisplayMode);
361362
}
362-
return xrandrExtSupported.booleanValue();
363+
return xrandrExtSupported;
363364
}
364365

365366
@Override

src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,11 @@ struct X11GraphicsConfigIDs {
6262
jfieldID bitsPerPixel;
6363
};
6464

65+
#define MAX_DISPLAY_MODES 256
66+
typedef struct {
67+
unsigned int width;
68+
unsigned int height;
69+
jint refresh;
70+
} DisplayMode;
71+
6572
#endif /* _AWT_GRAPHICSENV_H_ */

0 commit comments

Comments
 (0)