From c0cc74a7d525aaa7eb89f60c836589678053d5fb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 17 Sep 2012 03:30:36 +0200 Subject: Fixes Bug 615 - X11: Use proper screen index/name for shared resources and device denominated 'mutable' surfaces (dummy, offscreen, ..) Fix follows findings of Rob Hatcherson, but instead of parsing the display connection ourself we use the X11 macro 'DefaultScreen(display)' See "The screen number specified in the display_name argument is returned by the DefaultScreen() macro (or the XDefaultScreen() function)." Since I currently have no two-head X11 setup here, only xinerama via virtualbox, pls test / validate. Note: One Display connection may span multiple screens, i.e.: display 'lala:0.1' may span from screen 1 - 3 (non xinerama mode) Discussion: [1] How to validate whether a screen number belongs to one display connection ? We can query ScreenCount(display), however it is not clear what the range would be. [2] With 1 display connection spanning multiple screens, what is/are the proper connection string[s] ? [3] After all, it seems this ancient configuration really cannot beat a modern setup w/ XRandR having Xinerama enabled. The latter is the default anyways. --- make/scripts/tests.sh | 6 +++--- make/stub_includes/x11/window-lib.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'make') diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 05109e52f..9733e3710 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -91,7 +91,7 @@ function jrun() { #D_ARGS="-Dnewt.test.Screen.disableScreenMode -Dnewt.debug.Screen" #D_ARGS="-Djogl.debug.ExtensionAvailabilityCache -Djogl.debug=all -Dnativewindow.debug=all -Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true -Djogamp.debug.NativeLibrary.Lookup=true" #D_ARGS="-Dnewt.debug.MainThread" - D_ARGS="-Dnewt.debug.Window" + #D_ARGS="-Dnewt.debug.Window" #D_ARGS="-Dnativewindow.debug.GraphicsConfiguration -Dnativewindow.debug.NativeWindow" #D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.Animator -Djogl.debug.GLDrawable -Djogl.debug.GLContext -Djogl.debug.GLContext.TraceSwitch" #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.ExtensionAvailabilityCache" @@ -273,7 +273,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.glu.TestGluUnprojectFloatNOUI $* #testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteWindow01NEWT $* -#testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteGLWindows01NEWT $* +testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteGLWindows01NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* @@ -350,7 +350,7 @@ function testawtswt() { #testawt com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $* #testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNewtAWTWrapper $* #testawt com.jogamp.opengl.test.junit.newt.TestEventSourceNotAWTBug -testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot $* +#testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot $* #testawt com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot $* #testawt com.jogamp.opengl.test.junit.newt.TestListenerCom01AWT #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aAWT $* diff --git a/make/stub_includes/x11/window-lib.c b/make/stub_includes/x11/window-lib.c index bc5df4ae4..1204d033d 100644 --- a/make/stub_includes/x11/window-lib.c +++ b/make/stub_includes/x11/window-lib.c @@ -27,9 +27,12 @@ extern void XLockDisplay(Display *display); extern void XUnlockDisplay(Display *display); -extern Window RootWindow(Display *display, int screen_number); extern int DefaultScreen(Display *display); +extern int ScreenCount(Display *display); + +extern Window RootWindow(Display *display, int screen_number); + extern XVisualInfo *XGetVisualInfo( Display* /* display */, long /* vinfo_mask */, -- cgit v1.2.3