removing xinerama on X11 dependency, this wasn't working very usefully.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 7 Feb 2013 14:10:01 +0000 (14:10 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 7 Feb 2013 14:10:01 +0000 (14:10 +0000)
CMakeLists.txt
build_files/scons/config/freebsd7-config.py
build_files/scons/config/freebsd8-config.py
build_files/scons/config/freebsd9-config.py
build_files/scons/config/linux-config.py
intern/ghost/CMakeLists.txt
intern/ghost/SConscript
intern/ghost/intern/GHOST_SystemX11.cpp

index eea86a3..d208d73 100644 (file)
@@ -166,7 +166,6 @@ unset(PLATFORM_DEFAULT)
 
 if(UNIX AND NOT APPLE)
        option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)"   ON)
-       option(WITH_X11_XINERAMA "Enable multi-monitor support" ON)
        option(WITH_X11_XF86VMODE "Enable X11 video mode switching"     ON)
        option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON)
 
@@ -431,7 +430,6 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
        set(WITH_GHOST_XDND OFF)
        set(WITH_X11_XF86VMODE OFF)
        set(WITH_X11_XINPUT OFF)
-       set(WITH_X11_XINERAMA OFF)
 endif()
 
 if(MINGW)
@@ -822,14 +820,6 @@ if(UNIX AND NOT APPLE)
                        endif()
                endif()
 
-               if(WITH_X11_XINERAMA)
-                       if(X11_Xinerama_LIB)
-                               set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinerama_LIB}")
-                       else()
-                               set(WITH_X11_XINERAMA OFF)
-                       endif()
-               endif()
-
                if(WITH_X11_XF86VMODE)
                        # XXX, why dont cmake make this available?
                        FIND_LIBRARY(X11_Xxf86vmode_LIB Xxf86vm   ${X11_LIB_SEARCH_PATH})
@@ -2162,7 +2152,6 @@ if(FIRST_RUN)
        info_cfg_option(WITH_INSTALL_PORTABLE)
        info_cfg_option(WITH_X11_XF86VMODE)
        info_cfg_option(WITH_X11_XINPUT)
-       info_cfg_option(WITH_X11_XINERAMA)
        info_cfg_option(WITH_MEM_JEMALLOC)
        info_cfg_option(WITH_SYSTEM_GLEW)
        info_cfg_option(WITH_SYSTEM_OPENJPEG)
index f02ba68..02c9093 100644 (file)
@@ -139,9 +139,9 @@ BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
 WITH_BF_STATICOPENGL = False
 BF_OPENGL = '/usr/local'
 BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi Xinerama'
+BF_OPENGL_LIB = 'GL GLU X11 Xi'
 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
-BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libXinerama.a'
+BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
 
 WITH_BF_COLLADA = False
 BF_COLLADA = '#source/blender/collada'
index e772784..5d3308c 100644 (file)
@@ -139,9 +139,9 @@ BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
 WITH_BF_STATICOPENGL = False
 BF_OPENGL = '/usr/local'
 BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi Xinerama'
+BF_OPENGL_LIB = 'GL GLU X11 Xi'
 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
-BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libXinerama.a'
+BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
 
 WITH_BF_COLLADA = False
 BF_COLLADA = '#source/blender/collada'
index c3f90d4..98c2c8f 100644 (file)
@@ -139,9 +139,9 @@ BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
 WITH_BF_STATICOPENGL = False
 BF_OPENGL = '/usr/local'
 BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi Xinerama'
+BF_OPENGL_LIB = 'GL GLU X11 Xi'
 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
-BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libXinerama.a'
+BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
 
 WITH_BF_COLLADA = False
 BF_COLLADA = '#source/blender/collada'
index 701b4b2..068273e 100644 (file)
@@ -151,9 +151,9 @@ BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
 WITH_BF_STATICOPENGL = False
 BF_OPENGL = '/usr'
 BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi Xinerama'
+BF_OPENGL_LIB = 'GL GLU X11 Xi'
 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
-BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libXinerama.a'
+BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
 
 WITH_BF_COLLADA = False
 BF_COLLADA = '#source/blender/collada'
index c6269d4..12dd4c0 100644 (file)
@@ -276,13 +276,6 @@ elseif(UNIX)
                )
        endif()
 
-       if(WITH_X11_XINERAMA)
-               add_definitions(-DWITH_X11_XINERAMA)
-               list(APPEND INC_SYS
-                       ${X11_Xinerama_INCLUDE_PATH}
-               )
-       endif()
-
 elseif(WIN32)
        ## Warnings as errors, this is too strict!
        #if(MSVC)
index 8b5b1a8..7e142c4 100644 (file)
@@ -67,7 +67,6 @@ elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'f
     ## just dont use the PREFIX.
     # defs += ['PREFIX=\\"/usr/local/\\"']  # XXX, make an option
     defs += ['WITH_X11_XINPUT']  # XXX, make an option
-    defs += ['WITH_X11_XINERAMA']
 
     # freebsd doesn't seem to support XDND protocol
     if env['WITH_GHOST_XDND'] and window_system not in ('freebsd7', 'freebsd8', 'freebsd9'):
index 661f5e7..7ba8889 100644 (file)
 #  include "GHOST_DropTargetX11.h"
 #endif
 
-#ifdef WITH_X11_XINERAMA
-#  include "X11/extensions/Xinerama.h"
-#endif
-
 #include "GHOST_Debug.h"
 
 #include <X11/Xatom.h>
@@ -241,47 +237,9 @@ getMainDisplayDimensions(
                GHOST_TUns32& height) const
 {
        if (m_display) {
-
-#ifdef WITH_X11_XINERAMA
-               GHOST_TInt32 m_x = 1, m_y = 1;
-               getCursorPosition(m_x, m_y);
-
-               /* NOTE, no way to select a primary monitor, uses the first */
-               bool success = false;
-               int dummy1, dummy2;
-               if (XineramaQueryExtension(m_display, &dummy1, &dummy2)) {
-                       if (XineramaIsActive(m_display)) {
-                               int heads = 0;
-                               XineramaScreenInfo *p = XineramaQueryScreens(m_display, &heads);
-                               /* with a single head, all dimensions is fine */
-                               if (heads > 1) {
-                                       int i;
-                                       for (i = 0; i < heads; i++) {
-                                               if ((m_x >= p[i].x_org) && (m_x <= p[i].x_org + p[i].width) &&
-                                                   (m_y >= p[i].y_org) && (m_y <= p[i].y_org + p[i].height))
-                                               {
-                                                       width = p[i].width;
-                                                       height = p[i].height;
-                                                       break;
-                                               }
-                                       }
-                                       /* highly unlikely! */
-                                       if (i == heads) {
-                                               width = p[0].width;
-                                               height = p[0].height;
-                                       }
-                                       success = true;
-                               }
-                               XFree(p);
-                       }
-               }
-
-               if (success) {
-                       return;
-               }
-#endif
-
-               /* fallback to all */
+               /* note, for this to work as documented,
+                * we would need to use Xinerama check r54370 for code that did thia,
+                * we've since removed since its not worth the extra dep - campbell */
                getAllDisplayDimensions(width, height);
        }
 }