< 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 +1,7 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * 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,11 +32,13 @@
#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,10 +1625,12 @@
* 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,10 +1832,12 @@
(*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,11 +1873,11 @@
*/
JNIEXPORT jboolean JNICALL
Java_sun_awt_X11GraphicsDevice_initXrandrExtension
(JNIEnv *env, jclass x11gd)
{
-#ifdef HEADLESS
+#if defined(HEADLESS) || defined(_AIX)
return JNI_FALSE;
#else
int opcode = 0, firstEvent = 0, firstError = 0;
jboolean ret;
@@ -1894,11 +1900,11 @@
*/
JNIEXPORT jobject JNICALL
Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode
(JNIEnv* env, jclass x11gd, jint screen)
{
-#ifdef HEADLESS
+#if defined(HEADLESS) || defined(_AIX)
return NULL;
#else
XRRScreenConfiguration *config;
jobject displayMode = NULL;
@@ -1990,11 +1996,11 @@
JNIEXPORT void JNICALL
Java_sun_awt_X11GraphicsDevice_enumDisplayModes
(JNIEnv* env, jclass x11gd,
jint screen, jobject arrayList)
{
-#ifndef HEADLESS
+#if !defined(HEADLESS) && !defined(_AIX)
AWT_LOCK();
if (usingXinerama && XScreenCount(awt_display) > 0) {
XRRScreenResources *res = awt_XRRGetScreenResources(awt_display,
@@ -2078,11 +2084,11 @@
JNIEXPORT void JNICALL
Java_sun_awt_X11GraphicsDevice_configDisplayMode
(JNIEnv* env, jclass x11gd,
jint screen, jint width, jint height, jint refreshRate)
{
-#ifndef HEADLESS
+#if !defined(HEADLESS) && !defined(_AIX)
jboolean success = JNI_FALSE;
XRRScreenConfiguration *config;
Drawable root;
Rotation currentRotation = RR_Rotate_0;
@@ -2195,10 +2201,13 @@
/**
* 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,10 +2233,11 @@
}
awt_XRRFreeScreenResources(res);
}
AWT_UNLOCK();
return name;
+#endif /* _AIX */
}
/*
* Class: sun_awt_X11GraphicsDevice
* Method: getNativeScaleFactor
< prev index next >