< 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,42 **** #include <sun_awt_X11GraphicsDevice.h> #include <sun_awt_X11GraphicsConfig.h> #ifndef HEADLESS #include <X11/extensions/Xdbe.h> #include <X11/XKBlib.h> ! #ifndef _AIX #include <X11/extensions/Xrandr.h> #endif #include "GLXGraphicsConfig.h" #endif /* !HEADLESS */ --- 32,42 ---- #include <sun_awt_X11GraphicsDevice.h> #include <sun_awt_X11GraphicsConfig.h> #ifndef HEADLESS #include <X11/extensions/Xdbe.h> #include <X11/XKBlib.h> ! #ifndef NO_XRANDR #include <X11/extensions/Xrandr.h> #endif #include "GLXGraphicsConfig.h" #endif /* !HEADLESS */
*** 1625,1635 **** * Begin DisplayMode/FullScreen support */ #ifndef HEADLESS ! #ifndef _AIX #define BIT_DEPTH_MULTI java_awt_DisplayMode_BIT_DEPTH_MULTI #define REFRESH_RATE_UNKNOWN java_awt_DisplayMode_REFRESH_RATE_UNKNOWN typedef Status --- 1625,1635 ---- * Begin DisplayMode/FullScreen support */ #ifndef HEADLESS ! #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,1842 **** (*env)->CallObjectMethod(env, arrayList, mid, displayMode); (*env)->DeleteLocalRef(env, displayMode); } } ! #endif /* !_AIX */ static void X11GD_SetFullscreenMode(Window win, jboolean enabled) { Atom wmState = XInternAtom(awt_display, "_NET_WM_STATE", False); --- 1832,1842 ---- (*env)->CallObjectMethod(env, arrayList, mid, displayMode); (*env)->DeleteLocalRef(env, displayMode); } } ! #endif /* !NO_XRANDR */ static void X11GD_SetFullscreenMode(Window win, jboolean enabled) { Atom wmState = XInternAtom(awt_display, "_NET_WM_STATE", False);
*** 1873,1883 **** */ JNIEXPORT jboolean JNICALL Java_sun_awt_X11GraphicsDevice_initXrandrExtension (JNIEnv *env, jclass x11gd) { ! #if defined(HEADLESS) || defined(_AIX) return JNI_FALSE; #else int opcode = 0, firstEvent = 0, firstError = 0; jboolean ret; --- 1873,1883 ---- */ JNIEXPORT jboolean JNICALL Java_sun_awt_X11GraphicsDevice_initXrandrExtension (JNIEnv *env, jclass x11gd) { ! #if defined(HEADLESS) || defined(NO_XRANDR) return JNI_FALSE; #else int opcode = 0, firstEvent = 0, firstError = 0; jboolean ret;
*** 1900,1910 **** */ JNIEXPORT jobject JNICALL Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode (JNIEnv* env, jclass x11gd, jint screen) { ! #if defined(HEADLESS) || defined(_AIX) return NULL; #else XRRScreenConfiguration *config; jobject displayMode = NULL; --- 1900,1910 ---- */ JNIEXPORT jobject JNICALL Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode (JNIEnv* env, jclass x11gd, jint screen) { ! #if defined(HEADLESS) || defined(NO_XRANDR) return NULL; #else XRRScreenConfiguration *config; jobject displayMode = NULL;
*** 1996,2006 **** JNIEXPORT void JNICALL Java_sun_awt_X11GraphicsDevice_enumDisplayModes (JNIEnv* env, jclass x11gd, jint screen, jobject arrayList) { ! #if !defined(HEADLESS) && !defined(_AIX) AWT_LOCK(); if (usingXinerama && XScreenCount(awt_display) > 0) { XRRScreenResources *res = awt_XRRGetScreenResources(awt_display, --- 1996,2006 ---- JNIEXPORT void JNICALL Java_sun_awt_X11GraphicsDevice_enumDisplayModes (JNIEnv* env, jclass x11gd, jint screen, jobject arrayList) { ! #if !defined(HEADLESS) && !defined(NO_XRANDR) AWT_LOCK(); if (usingXinerama && XScreenCount(awt_display) > 0) { XRRScreenResources *res = awt_XRRGetScreenResources(awt_display,
*** 2084,2094 **** 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) jboolean success = JNI_FALSE; XRRScreenConfiguration *config; Drawable root; Rotation currentRotation = RR_Rotate_0; --- 2084,2094 ---- JNIEXPORT void JNICALL Java_sun_awt_X11GraphicsDevice_configDisplayMode (JNIEnv* env, jclass x11gd, jint screen, jint width, jint height, jint refreshRate) { ! #if !defined(HEADLESS) && !defined(NO_XRANDR) jboolean success = JNI_FALSE; XRRScreenConfiguration *config; Drawable root; Rotation currentRotation = RR_Rotate_0;
*** 2201,2211 **** /** * End DisplayMode/FullScreen support */ static char *get_output_screen_name(JNIEnv *env, int screen) { ! #ifdef _AIX return NULL; #else if (!awt_XRRGetScreenResources || !awt_XRRGetOutputInfo) { return NULL; } --- 2201,2211 ---- /** * End DisplayMode/FullScreen support */ static char *get_output_screen_name(JNIEnv *env, int screen) { ! #ifdef NO_XRANDR return NULL; #else if (!awt_XRRGetScreenResources || !awt_XRRGetOutputInfo) { return NULL; }
*** 2233,2243 **** } awt_XRRFreeScreenResources(res); } AWT_UNLOCK(); return name; ! #endif /* _AIX */ } /* * Class: sun_awt_X11GraphicsDevice * Method: getNativeScaleFactor --- 2233,2243 ---- } awt_XRRFreeScreenResources(res); } AWT_UNLOCK(); return name; ! #endif /* NO_XRANDR */ } /* * Class: sun_awt_X11GraphicsDevice * Method: getNativeScaleFactor
< prev index next >