From 76b7afd909fc0b01214c37f4b3407309f60ccfba Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 7 Feb 2013 14:10:01 +0000 Subject: removing xinerama on X11 dependency, this wasn't working very usefully. --- intern/ghost/CMakeLists.txt | 7 ----- intern/ghost/SConscript | 1 - intern/ghost/intern/GHOST_SystemX11.cpp | 48 +++------------------------------ 3 files changed, 3 insertions(+), 53 deletions(-) (limited to 'intern/ghost') diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index c6269d49b47..12dd4c0d3eb 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -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) diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript index 8b5b1a82cff..7e142c4aeab 100644 --- a/intern/ghost/SConscript +++ b/intern/ghost/SConscript @@ -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'): diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 661f5e70dc6..7ba8889fd1e 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -50,10 +50,6 @@ # include "GHOST_DropTargetX11.h" #endif -#ifdef WITH_X11_XINERAMA -# include "X11/extensions/Xinerama.h" -#endif - #include "GHOST_Debug.h" #include @@ -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); } } -- cgit v1.2.3