summaryrefslogtreecommitdiffstats
path: root/src/native/jogl
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-05-28 21:48:30 +0000
committerKenneth Russel <[email protected]>2006-05-28 21:48:30 +0000
commit833d0c87aeb985dcdb34367d6803ef2beae515b3 (patch)
tree593a45ee4b3ba66fb1d560272863fee4e5550f0e /src/native/jogl
parent66b19a72d52184ff4fa1951f7e5745ac9808275a (diff)
Fixed build problems on Solaris with Xinerama support for Issue 216;
now builds and runs on Linux and Solaris at least on non-Xinerama setups git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@783 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/native/jogl')
-rw-r--r--src/native/jogl/XineramaHelper.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/native/jogl/XineramaHelper.c b/src/native/jogl/XineramaHelper.c
index 3991204d5..09ad0b706 100644
--- a/src/native/jogl/XineramaHelper.c
+++ b/src/native/jogl/XineramaHelper.c
@@ -51,6 +51,7 @@ typedef Status XineramaGetCenterHintFunc(Display* display, int screen_number,
int* x, int* y);
XineramaGetCenterHintFunc* XineramaSolarisCenterFunc = NULL;
+#include <dlfcn.h>
#elif defined(__linux__)
@@ -61,11 +62,13 @@ XineramaGetCenterHintFunc* XineramaSolarisCenterFunc = NULL;
Bool XineramaEnabled(Display* display) {
#ifdef __sun
+#define MAXFRAMEBUFFERS 16
char* XinExtName = "XINERAMA";
int32_t major_opcode, first_event, first_error;
Bool gotXinExt = False;
void* libHandle = 0;
unsigned char fbhints[MAXFRAMEBUFFERS];
+ XRectangle fbrects[MAXFRAMEBUFFERS];
int locNumScr = 0;
Bool usingXinerama = False;
@@ -74,7 +77,7 @@ Bool XineramaEnabled(Display* display) {
char* XineramaGetCenterHintName = "XineramaGetCenterHint";
XineramaGetInfoFunc* XineramaSolarisFunc = NULL;
- gotXinExt = XQueryExtension(awt_display, XinExtName, &major_opcode,
+ gotXinExt = XQueryExtension(display, XinExtName, &major_opcode,
&first_event, &first_error);
if (gotXinExt) {
@@ -86,12 +89,10 @@ Bool XineramaEnabled(Display* display) {
(XineramaGetCenterHintFunc*)dlsym(libHandle,
XineramaGetCenterHintName);
if (XineramaSolarisFunc != NULL) {
- if ((*XineramaSolarisFunc)(awt_display, 0, &fbrects[0],
+ if ((*XineramaSolarisFunc)(display, 0, &fbrects[0],
&fbhints[0], &locNumScr) != 0) {
usingXinerama = True;
- /* set global number of screens */
- awt_numScreens = locNumScr;
}
}
dlclose(libHandle);
@@ -112,14 +113,11 @@ Bool XineramaEnabled(Display* display) {
&first_event, &first_error);
if (gotXinExt) {
- printf("Have Xinerama extension\n");
xinInfo = XineramaQueryScreens(display, &locNumScr);
if (xinInfo != NULL) {
- printf("Xinerama extension active\n");
return True;
}
}
- printf("Xinerama extension not present or inactive\n");
return False;
#else