< prev index next >

src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c

Print this page
rev 52666 : 8214343: Handle the absence of Xrandr more generically
Reviewed-by:

@@ -32,11 +32,11 @@
 #include <sun_awt_X11GraphicsDevice.h>
 #include <sun_awt_X11GraphicsConfig.h>
 #ifndef HEADLESS
 #include <X11/extensions/Xdbe.h>
 #include <X11/XKBlib.h>
-#ifndef _AIX
+#ifndef NO_XRANDR
 #include <X11/extensions/Xrandr.h>
 #endif
 #include "GLXGraphicsConfig.h"
 #endif /* !HEADLESS */
 

@@ -1625,11 +1625,11 @@
  * Begin DisplayMode/FullScreen support
  */
 
 #ifndef HEADLESS
 
-#ifndef _AIX
+#ifndef NO_XRANDR
 
 #define BIT_DEPTH_MULTI java_awt_DisplayMode_BIT_DEPTH_MULTI
 #define REFRESH_RATE_UNKNOWN java_awt_DisplayMode_REFRESH_RATE_UNKNOWN
 
 typedef Status

@@ -1832,11 +1832,11 @@
         (*env)->CallObjectMethod(env, arrayList, mid, displayMode);
         (*env)->DeleteLocalRef(env, displayMode);
     }
 }
 
-#endif /* !_AIX */
+#endif /* !NO_XRANDR */
 
 static void
 X11GD_SetFullscreenMode(Window win, jboolean enabled)
 {
     Atom wmState = XInternAtom(awt_display, "_NET_WM_STATE", False);

@@ -1873,11 +1873,11 @@
  */
 JNIEXPORT jboolean JNICALL
 Java_sun_awt_X11GraphicsDevice_initXrandrExtension
     (JNIEnv *env, jclass x11gd)
 {
-#if defined(HEADLESS) || defined(_AIX)
+#if defined(HEADLESS) || defined(NO_XRANDR)
     return JNI_FALSE;
 #else
     int opcode = 0, firstEvent = 0, firstError = 0;
     jboolean ret;
 

@@ -1900,11 +1900,11 @@
  */
 JNIEXPORT jobject JNICALL
 Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode
     (JNIEnv* env, jclass x11gd, jint screen)
 {
-#if defined(HEADLESS) || defined(_AIX)
+#if defined(HEADLESS) || defined(NO_XRANDR)
     return NULL;
 #else
     XRRScreenConfiguration *config;
     jobject displayMode = NULL;
 

@@ -1996,11 +1996,11 @@
 JNIEXPORT void JNICALL
 Java_sun_awt_X11GraphicsDevice_enumDisplayModes
     (JNIEnv* env, jclass x11gd,
      jint screen, jobject arrayList)
 {
-#if !defined(HEADLESS) && !defined(_AIX)
+#if !defined(HEADLESS) && !defined(NO_XRANDR)
 
     AWT_LOCK();
 
     if (usingXinerama && XScreenCount(awt_display) > 0) {
         XRRScreenResources *res = awt_XRRGetScreenResources(awt_display,

@@ -2084,11 +2084,11 @@
 JNIEXPORT void JNICALL
 Java_sun_awt_X11GraphicsDevice_configDisplayMode
     (JNIEnv* env, jclass x11gd,
      jint screen, jint width, jint height, jint refreshRate)
 {
-#if !defined(HEADLESS) && !defined(_AIX)
+#if !defined(HEADLESS) && !defined(NO_XRANDR)
     jboolean success = JNI_FALSE;
     XRRScreenConfiguration *config;
     Drawable root;
     Rotation currentRotation = RR_Rotate_0;
 

@@ -2201,11 +2201,11 @@
 /**
  * End DisplayMode/FullScreen support
  */
 
 static char *get_output_screen_name(JNIEnv *env, int screen) {
-#ifdef _AIX
+#ifdef NO_XRANDR
     return NULL;
 #else
     if (!awt_XRRGetScreenResources || !awt_XRRGetOutputInfo) {
         return NULL;
     }

@@ -2233,11 +2233,11 @@
         }
         awt_XRRFreeScreenResources(res);
     }
     AWT_UNLOCK();
     return name;
-#endif /* _AIX */
+#endif /* NO_XRANDR */
 }
 
 /*
  * Class:     sun_awt_X11GraphicsDevice
  * Method:    getNativeScaleFactor
< prev index next >