[Libreoffice-commits] .: vcl/unx
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Oct 27 07:21:44 PDT 2011
vcl/unx/generic/app/saldisp.cxx | 38 ++++++++++++++++----------------------
1 file changed, 16 insertions(+), 22 deletions(-)
New commits:
commit 8619d58ecdaf181bd1a2a65c371545d7d9f80c14
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 27 15:20:14 2011 +0100
there is no USE_XINERAMA define, but USE_XINERAMA_XSUN/USE_XINERAMA_XORG
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 74c4ef7..a26027d 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -58,7 +58,6 @@
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
-#ifdef USE_XINERAMA
#ifdef USE_XINERAMA_XORG
#include <X11/extensions/Xinerama.h>
#elif defined USE_XINERAMA_XSUN
@@ -69,9 +68,6 @@ Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*);
#else
#include <X11/extensions/xinerama.h>
#endif
-#else
-#error USE_XINERAMA but no xinerama version
-#endif
#endif
#include <tools/postx.h>
@@ -2455,7 +2451,6 @@ void SalDisplay::InitXinerama()
m_bXinerama = false;
return; // multiple screens mean no xinerama
}
-#ifdef USE_XINERAMA
#if defined(USE_XINERAMA_XSUN)
int nFramebuffers = 1;
if( XineramaGetState( pDisp_, m_nDefaultScreen ) )
@@ -2480,28 +2475,28 @@ void SalDisplay::InitXinerama()
}
}
#elif defined(USE_XINERAMA_XORG)
-if( XineramaIsActive( pDisp_ ) )
-{
- int nFramebuffers = 1;
- XineramaScreenInfo* pScreens = XineramaQueryScreens( pDisp_, &nFramebuffers );
- if( pScreens )
+ if( XineramaIsActive( pDisp_ ) )
{
- if( nFramebuffers > 1 )
+ int nFramebuffers = 1;
+ XineramaScreenInfo* pScreens = XineramaQueryScreens( pDisp_, &nFramebuffers );
+ if( pScreens )
{
- m_aXineramaScreens = std::vector<Rectangle>();
- m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers);
- for( int i = 0; i < nFramebuffers; i++ )
+ if( nFramebuffers > 1 )
{
- addXineramaScreenUnique( i, pScreens[i].x_org,
- pScreens[i].y_org,
- pScreens[i].width,
- pScreens[i].height );
+ m_aXineramaScreens = std::vector<Rectangle>();
+ m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers);
+ for( int i = 0; i < nFramebuffers; i++ )
+ {
+ addXineramaScreenUnique( i, pScreens[i].x_org,
+ pScreens[i].y_org,
+ pScreens[i].width,
+ pScreens[i].height );
+ }
+ m_bXinerama = m_aXineramaScreens.size() > 1;
}
- m_bXinerama = m_aXineramaScreens.size() > 1;
+ XFree( pScreens );
}
- XFree( pScreens );
}
-}
#endif
#if OSL_DEBUG_LEVEL > 1
if( m_bXinerama )
@@ -2510,7 +2505,6 @@ if( XineramaIsActive( pDisp_ ) )
fprintf( stderr, "Xinerama screen: %ldx%ld+%ld+%ld\n", it->GetWidth(), it->GetHeight(), it->Left(), it->Top() );
}
#endif
-#endif // USE_XINERAMA
}
More information about the Libreoffice-commits
mailing list