diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-01-14 23:25:55 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-01-16 09:28:29 +0000 |
commit | 8d151e0e55e1945bc5f633dc916372a3ea27a16d (patch) | |
tree | 96a6a50329fd6b6b57cc1e266d16b8464d4b8b2a /vcl/unx/x11/x11sys.cxx | |
parent | a5247645b4d133056ded317b1ed0e9e590afcf4d (diff) |
vcl: introduce crystal clear separation between X11 Screens and DisplayScreens
A DisplayScreen is a screen index as used by the upper level abstractions,
an X11Screen is a wrapper around an integer X screen index.
Diffstat (limited to 'vcl/unx/x11/x11sys.cxx')
-rw-r--r-- | vcl/unx/x11/x11sys.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index a5fb4613a534..f30d873dad91 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -57,20 +57,21 @@ X11SalSystem::~X11SalSystem() unsigned int X11SalSystem::GetDisplayScreenCount() { SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay(); - return pSalDisp->IsXinerama() ? pSalDisp->GetXineramaScreens().size() : pSalDisp->GetScreenCount(); + return pSalDisp->IsXinerama() ? pSalDisp->GetXineramaScreens().size() : + pSalDisp->GetXScreenCount(); } bool X11SalSystem::IsUnifiedDisplay() { SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay(); - unsigned int nScreenCount = pSalDisp->GetScreenCount(); + unsigned int nScreenCount = pSalDisp->GetXScreenCount(); return pSalDisp->IsXinerama() ? true : (nScreenCount == 1); } unsigned int X11SalSystem::GetDisplayDefaultScreen() { SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay(); - return pSalDisp->GetDefaultScreenNumber(); + return pSalDisp->GetDefaultXScreen().getXScreen(); } Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) @@ -85,7 +86,8 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) } else { - const SalDisplay::ScreenData& rScreen = pSalDisp->getDataForScreen( nScreen ); + const SalDisplay::ScreenData& rScreen = + pSalDisp->getDataForScreen( SalX11Screen( nScreen ) ); aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize ); } @@ -116,7 +118,7 @@ rtl::OUString X11SalSystem::GetDisplayScreenName( unsigned int nScreen ) } else { - if( nScreen >= static_cast<unsigned int>(pSalDisp->GetScreenCount()) ) + if( nScreen >= static_cast<unsigned int>(pSalDisp->GetXScreenCount()) ) nScreen = 0; rtl::OUStringBuffer aBuf( 256 ); aBuf.append( rtl::OStringToOUString( rtl::OString( DisplayString( pSalDisp->GetDisplay() ) ), osl_getThreadTextEncoding() ) ); |