< prev index next >

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

Print this page
rev 52571 : 8213944: Fix AIX build after the removal of Xrandr.h and add a configure check for it

*** 1,7 **** /* ! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 32,42 **** --- 32,44 ---- #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 */ #include <jni.h> #include <jni_util.h>
*** 1623,1632 **** --- 1625,1636 ---- * 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 (*XRRQueryVersionType) (Display *dpy, int *major_versionp, int *minor_versionp);
*** 1828,1837 **** --- 1832,1843 ---- (*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); Atom wmStateFs = XInternAtom(awt_display,
*** 1867,1877 **** */ JNIEXPORT jboolean JNICALL Java_sun_awt_X11GraphicsDevice_initXrandrExtension (JNIEnv *env, jclass x11gd) { ! #ifdef HEADLESS 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(_AIX) return JNI_FALSE; #else int opcode = 0, firstEvent = 0, firstError = 0; jboolean ret;
*** 1894,1904 **** */ JNIEXPORT jobject JNICALL Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode (JNIEnv* env, jclass x11gd, jint screen) { ! #ifdef HEADLESS 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(_AIX) return NULL; #else XRRScreenConfiguration *config; jobject displayMode = NULL;
*** 1990,2000 **** JNIEXPORT void JNICALL Java_sun_awt_X11GraphicsDevice_enumDisplayModes (JNIEnv* env, jclass x11gd, jint screen, jobject arrayList) { ! #ifndef HEADLESS 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(_AIX) AWT_LOCK(); if (usingXinerama && XScreenCount(awt_display) > 0) { XRRScreenResources *res = awt_XRRGetScreenResources(awt_display,
*** 2078,2088 **** JNIEXPORT void JNICALL Java_sun_awt_X11GraphicsDevice_configDisplayMode (JNIEnv* env, jclass x11gd, jint screen, jint width, jint height, jint refreshRate) { ! #ifndef HEADLESS 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(_AIX) jboolean success = JNI_FALSE; XRRScreenConfiguration *config; Drawable root; Rotation currentRotation = RR_Rotate_0;
*** 2195,2204 **** --- 2201,2213 ---- /** * 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; } char *name = NULL; AWT_LOCK();
*** 2224,2233 **** --- 2233,2243 ---- } awt_XRRFreeScreenResources(res); } AWT_UNLOCK(); return name; + #endif /* _AIX */ } /* * Class: sun_awt_X11GraphicsDevice * Method: getNativeScaleFactor
< prev index next >