summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-01-14 10:31:40 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-01-16 15:34:45 +0000
commit64213b196a8c1817374934b10bf7b96adb5005d5 (patch)
tree4359b6933f947196e0d281e6ec7c19e1372790d0 /vcl
parent480d2d6d140f54dbfdff674aad9cdc90ded7c846 (diff)
vcl: rename ambiguous IsMultiDisplay to IsUnifiedDisplay, and simplify
Diffstat (limited to 'vcl')
-rw-r--r--vcl/aqua/source/app/salsys.cxx10
-rw-r--r--vcl/headless/svpdummies.cxx10
-rw-r--r--vcl/inc/aqua/salsys.h2
-rw-r--r--vcl/inc/headless/svpdummies.hxx2
-rw-r--r--vcl/inc/ios/salsys.h2
-rw-r--r--vcl/inc/salsys.hxx12
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx1
-rw-r--r--vcl/inc/unx/gtk/gtksys.hxx2
-rw-r--r--vcl/inc/unx/x11/x11sys.hxx2
-rw-r--r--vcl/inc/vcl/svapp.hxx14
-rw-r--r--vcl/inc/win/salsys.h1
-rw-r--r--vcl/ios/source/app/salsys.cxx10
-rw-r--r--vcl/source/app/svapp.cxx6
-rw-r--r--vcl/source/components/display.cxx50
-rw-r--r--vcl/source/window/floatwin.cxx2
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/syswin.cxx4
-rw-r--r--vcl/unx/gtk/app/gtksys.cxx4
-rw-r--r--vcl/unx/x11/x11sys.cxx4
19 files changed, 50 insertions, 90 deletions
diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx
index 0061d63db68f..6213f38cc947 100644
--- a/vcl/aqua/source/app/salsys.cxx
+++ b/vcl/aqua/source/app/salsys.cxx
@@ -53,16 +53,6 @@ unsigned int AquaSalSystem::GetDisplayScreenCount()
return pScreens ? [pScreens count] : 1;
}
-bool AquaSalSystem::IsMultiDisplay()
-{
- return false;
-}
-
-unsigned int AquaSalSystem::GetDefaultDisplayNumber()
-{
- return 0;
-}
-
Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
NSArray* pScreens = [NSScreen screens];
diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx
index 60f5c2184b3d..74d9fc0c3cae 100644
--- a/vcl/headless/svpdummies.cxx
+++ b/vcl/headless/svpdummies.cxx
@@ -70,16 +70,6 @@ unsigned int SvpSalSystem::GetDisplayScreenCount()
return 1;
}
-unsigned int SvpSalSystem::GetDefaultDisplayNumber()
-{
- return 0;
-}
-
-bool SvpSalSystem::IsMultiDisplay()
-{
- return false;
-}
-
Rectangle SvpSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
Rectangle aRect;
diff --git a/vcl/inc/aqua/salsys.h b/vcl/inc/aqua/salsys.h
index dc8b6cac4496..bc09765cb0d3 100644
--- a/vcl/inc/aqua/salsys.h
+++ b/vcl/inc/aqua/salsys.h
@@ -45,8 +45,6 @@ public:
// get info about the display
virtual unsigned int GetDisplayScreenCount();
- virtual bool IsMultiDisplay();
- virtual unsigned int GetDefaultDisplayNumber();
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx
index 54c7ef4cbf33..045214ec65cd 100644
--- a/vcl/inc/headless/svpdummies.hxx
+++ b/vcl/inc/headless/svpdummies.hxx
@@ -81,8 +81,6 @@ class SvpSalSystem : public SalSystem
virtual ~SvpSalSystem();
// get info about the display
virtual unsigned int GetDisplayScreenCount();
- virtual bool IsMultiDisplay();
- virtual unsigned int GetDefaultDisplayNumber();
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
virtual rtl::OUString GetScreenName( unsigned int nScreen );
diff --git a/vcl/inc/ios/salsys.h b/vcl/inc/ios/salsys.h
index e586c8dfb356..81522e82da2d 100644
--- a/vcl/inc/ios/salsys.h
+++ b/vcl/inc/ios/salsys.h
@@ -39,8 +39,6 @@ public:
// get info about the display
virtual unsigned int GetDisplayScreenCount();
- virtual bool IsMultiDisplay();
- virtual unsigned int GetDefaultDisplayNumber();
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx
index 1a53ec978441..24af20a118d7 100644
--- a/vcl/inc/salsys.hxx
+++ b/vcl/inc/salsys.hxx
@@ -75,20 +75,20 @@ public:
@returns the number of active screens
*/
virtual unsigned int GetDisplayScreenCount() = 0;
- /* Queries whether multiple screens are truly separate
+ /* Queries whether multiple screens are part of one bigger display
- @returns true if screens are distinct and windows cannot
- be moved between them or span multiple of them
- false if screens form up one big display
+ @returns true if screens form one bug display
+ false if screens are distinct and windows cannot
+ be moved between, or span multiple screens
*/
- virtual bool IsMultiDisplay() = 0;
+ virtual bool IsUnifiedDisplay() { return true; }
/* Queries the default screen number. The default screen is the
screen on which windows will appear if no special positioning
is made.
@returns the default screen number
*/
- virtual unsigned int GetDefaultDisplayNumber() = 0;
+ virtual unsigned int GetDefaultDisplayNumber() { return 0; }
/* Gets relative position and size of the screens attached to the display
@param nScreen
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 2b5627ca5349..cbd1341f7896 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -155,7 +155,6 @@ public:
virtual int CaptureMouse( SalFrame* pFrame );
#if GTK_CHECK_VERSION(3,0,0)
- bool IsXinerama() { return !m_pSys->IsMultiDisplay(); }
int GetDefaultScreenNumber() { return m_pSys->GetDefaultDisplayNumber(); }
int GetScreenCount() { return m_pSys->GetDisplayScreenCount(); }
Size GetScreenSize( int screen );
diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx
index c310e1729fad..4836f8b41ee1 100644
--- a/vcl/inc/unx/gtk/gtksys.hxx
+++ b/vcl/inc/unx/gtk/gtksys.hxx
@@ -41,7 +41,7 @@ public:
virtual ~GtkSalSystem();
static GtkSalSystem *GetSingleton();
- virtual bool IsMultiDisplay();
+ virtual bool IsUnifiedDisplay();
virtual unsigned int GetDisplayScreenCount();
virtual unsigned int GetDefaultDisplayNumber();
virtual rtl::OUString GetScreenName (unsigned int nScreen);
diff --git a/vcl/inc/unx/x11/x11sys.hxx b/vcl/inc/unx/x11/x11sys.hxx
index 403625f20aa7..d030d8432f5d 100644
--- a/vcl/inc/unx/x11/x11sys.hxx
+++ b/vcl/inc/unx/x11/x11sys.hxx
@@ -44,7 +44,7 @@ public:
// overload pure virtual methods
virtual unsigned int GetDisplayScreenCount();
- virtual bool IsMultiDisplay();
+ virtual bool IsUnifiedDisplay();
virtual unsigned int GetDefaultDisplayNumber();
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 9cb8639802d1..f0bf4dd50d32 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -285,16 +285,16 @@ public:
static unsigned int GetScreenCount();
static Rectangle GetScreenPosSizePixel( unsigned int nScreen );
- // IsMultiDisplay returns:
- // true: different screens are separate and windows cannot be moved
- // between them (e.g. Xserver with multiple screens)
- // false: screens form up one large display area
+ // IsUnifiedDisplay returns:
+ // true: screens form up one large display area
// windows can be moved between single screens
// (e.g. Xserver with Xinerama, Windows)
- SAL_DLLPRIVATE static bool IsMultiDisplay();
- // if IsMultiDisplay() == false the return value will be
+ // false: different screens are separate and windows cannot be moved
+ // between them (e.g. Xserver with multiple screens)
+ SAL_DLLPRIVATE static bool IsUnifiedDisplay();
+ // if IsUnifiedDisplay() == true the return value will be
// nearest screen of the target rectangle
- // in case of IsMultiDisplay() == true the return value
+ // in case of IsUnifiedDisplay() == false the return value
// will always be GetDefaultDisplayNumber()
SAL_DLLPRIVATE static unsigned int GetBestScreen( const Rectangle& );
SAL_DLLPRIVATE static Rectangle GetWorkAreaPosSizePixel( unsigned int nScreen );
diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h
index 30d5506add7f..8eb002af79a2 100644
--- a/vcl/inc/win/salsys.h
+++ b/vcl/inc/win/salsys.h
@@ -69,7 +69,6 @@ public:
virtual ~WinSalSystem();
virtual unsigned int GetDisplayScreenCount();
- virtual bool IsMultiDisplay();
virtual unsigned int GetDefaultDisplayNumber();
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
diff --git a/vcl/ios/source/app/salsys.cxx b/vcl/ios/source/app/salsys.cxx
index 9d300fd60804..12be2c5b9466 100644
--- a/vcl/ios/source/app/salsys.cxx
+++ b/vcl/ios/source/app/salsys.cxx
@@ -53,16 +53,6 @@ unsigned int IosSalSystem::GetDisplayScreenCount()
return pScreens ? [pScreens count] : 1;
}
-bool IosSalSystem::IsMultiDisplay()
-{
- return false;
-}
-
-unsigned int IosSalSystem::GetDefaultDisplayNumber()
-{
- return 0;
-}
-
Rectangle IosSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
NSArray* pScreens = [UIScreen screens];
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 44a08442ecc1..74a561c6aef0 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1286,10 +1286,10 @@ rtl::OUString Application::GetScreenName( unsigned int nScreen )
return pSys ? pSys->GetScreenName( nScreen ) : rtl::OUString();
}
-bool Application::IsMultiDisplay()
+bool Application::IsUnifiedDisplay()
{
SalSystem* pSys = ImplGetSalSystem();
- return pSys ? pSys->IsMultiDisplay() : false;
+ return pSys ? pSys->IsUnifiedDisplay() : true;
}
unsigned int Application::GetDefaultDisplayNumber()
@@ -1323,7 +1323,7 @@ unsigned long calcDistSquare( const Point& i_rPoint, const Rectangle& i_rRect )
unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
{
- if( IsMultiDisplay() )
+ if( !IsUnifiedDisplay() )
return GetDefaultDisplayNumber();
const unsigned int nScreens = GetScreenCount();
diff --git a/vcl/source/components/display.cxx b/vcl/source/components/display.cxx
index cfab922326ac..1ebcbc01e735 100644
--- a/vcl/source/components/display.cxx
+++ b/vcl/source/components/display.cxx
@@ -59,7 +59,7 @@ public:
DisplayInfo( sal_uInt32 nDisplay );
// XPropertySet
- virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (RuntimeException);
+ virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (RuntimeException);
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException);
virtual Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException);
virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException);
@@ -68,14 +68,14 @@ public:
virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException);
// XPropertySetInfo
- virtual Sequence< Property > SAL_CALL getProperties( ) throw (RuntimeException);
+ virtual Sequence< Property > SAL_CALL getProperties() throw (RuntimeException);
virtual Property SAL_CALL getPropertyByName( const OUString& aName ) throw (UnknownPropertyException, RuntimeException);
virtual ::sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) throw (RuntimeException);
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
+ virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
virtual ::sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException);
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException);
private:
sal_uInt32 mnDisplay;
@@ -93,7 +93,7 @@ DisplayInfo::DisplayInfo( sal_uInt32 nDisplay )
}
// XPropertySet
-Reference< XPropertySetInfo > SAL_CALL DisplayInfo::getPropertySetInfo( ) throw (RuntimeException)
+Reference< XPropertySetInfo > SAL_CALL DisplayInfo::getPropertySetInfo() throw (RuntimeException)
{
return this;
}
@@ -130,7 +130,7 @@ void SAL_CALL DisplayInfo::addVetoableChangeListener( const OUString&, const Ref
void SAL_CALL DisplayInfo::removeVetoableChangeListener( const OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) {}
// XPropertySetInfo
-Sequence< Property > SAL_CALL DisplayInfo::getProperties( ) throw (RuntimeException)
+Sequence< Property > SAL_CALL DisplayInfo::getProperties() throw (RuntimeException)
{
Sequence< Property > aProps(2);
aProps[0] = getPropertyByName( OUString::createFromAscii( pScreenAreaName ) );
@@ -153,7 +153,7 @@ Property SAL_CALL DisplayInfo::getPropertyByName( const OUString& aName ) throw
}
// XServiceInfo
-OUString SAL_CALL DisplayInfo::getImplementationName( ) throw (RuntimeException)
+OUString SAL_CALL DisplayInfo::getImplementationName() throw (RuntimeException)
{
return OUString(RTL_CONSTASCII_USTRINGPARAM("vcl::DisplayInfo"));
}
@@ -169,7 +169,7 @@ OUString SAL_CALL DisplayInfo::getImplementationName( ) throw (RuntimeException
return sal_False;
}
-Sequence< OUString > SAL_CALL DisplayInfo::getSupportedServiceNames( ) throw (RuntimeException)
+Sequence< OUString > SAL_CALL DisplayInfo::getSupportedServiceNames() throw (RuntimeException)
{
OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.DisplayInfo"));
return Sequence< OUString >(&aServiceName, 1);
@@ -183,7 +183,7 @@ public:
DisplayAccess ();
// XPropertySet
- virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (RuntimeException);
+ virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (RuntimeException);
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException);
virtual Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException);
virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException);
@@ -192,7 +192,7 @@ public:
virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException);
// XPropertySetInfo
- virtual Sequence< Property > SAL_CALL getProperties( ) throw (RuntimeException);
+ virtual Sequence< Property > SAL_CALL getProperties() throw (RuntimeException);
virtual Property SAL_CALL getPropertyByName( const OUString& aName ) throw (UnknownPropertyException, RuntimeException);
virtual ::sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) throw (RuntimeException);
@@ -201,13 +201,13 @@ public:
virtual Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException);
// XElementAccess
- virtual Type SAL_CALL getElementType( ) throw (RuntimeException);
- virtual ::sal_Bool SAL_CALL hasElements( ) throw (RuntimeException);
+ virtual Type SAL_CALL getElementType() throw (RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasElements() throw (RuntimeException);
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
+ virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
virtual ::sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException);
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException);
};
Sequence< OUString > DisplayAccess_getSupportedServiceNames()
@@ -230,11 +230,11 @@ DisplayAccess::DisplayAccess()
{
}
-static const char* pMultiDisplayName = "MultiDisplay";
+static const char* pUnifiedDisplayName = "IsUnifiedDisplay";
static const char* pDefaultDisplayName = "DefaultDisplay";
// XPropertySet
-Reference< XPropertySetInfo > SAL_CALL DisplayAccess::getPropertySetInfo( ) throw (RuntimeException)
+Reference< XPropertySetInfo > SAL_CALL DisplayAccess::getPropertySetInfo() throw (RuntimeException)
{
return this;
}
@@ -247,9 +247,9 @@ void SAL_CALL DisplayAccess::setPropertyValue( const OUString& /*aPropertyName*
Any SAL_CALL DisplayAccess::getPropertyValue( const OUString& PropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
Any aRet;
- if( PropertyName.equalsAscii( pMultiDisplayName ) )
+ if( PropertyName.equalsAscii( pUnifiedDisplayName ) )
{
- aRet <<= sal_Bool( Application::IsMultiDisplay() );
+ aRet <<= sal_Bool( Application::IsUnifiedDisplay() );
}
else if( PropertyName.equalsAscii( pDefaultDisplayName ) )
{
@@ -267,17 +267,17 @@ void SAL_CALL DisplayAccess::addVetoableChangeListener( const OUString&, const R
void SAL_CALL DisplayAccess::removeVetoableChangeListener( const OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) {}
// XPropertySetInfo
-Sequence< Property > SAL_CALL DisplayAccess::getProperties( ) throw (RuntimeException)
+Sequence< Property > SAL_CALL DisplayAccess::getProperties() throw (RuntimeException)
{
Sequence< Property > aProps(2);
- aProps[0] = getPropertyByName( OUString::createFromAscii( pMultiDisplayName ) );
+ aProps[0] = getPropertyByName( OUString::createFromAscii( pUnifiedDisplayName ) );
aProps[1] = getPropertyByName( OUString::createFromAscii( pDefaultDisplayName ) );
return aProps;
}
Property SAL_CALL DisplayAccess::getPropertyByName( const OUString& aName ) throw (UnknownPropertyException, RuntimeException)
{
- if( aName.equalsAscii( pMultiDisplayName ) )
+ if( aName.equalsAscii( pUnifiedDisplayName ) )
return Property( aName, 0, ::getCppuType( (sal_Bool const *)0 ), PropertyAttribute::READONLY );
if( aName.equalsAscii( pDefaultDisplayName ) )
@@ -287,7 +287,7 @@ Property SAL_CALL DisplayAccess::getPropertyByName( const OUString& aName ) thro
::sal_Bool SAL_CALL DisplayAccess::hasPropertyByName( const OUString& Name ) throw (RuntimeException)
{
- return Name.equalsAscii( pMultiDisplayName ) ||
+ return Name.equalsAscii( pUnifiedDisplayName ) ||
Name.equalsAscii( pDefaultDisplayName );
}
@@ -306,7 +306,7 @@ Any SAL_CALL DisplayAccess::getByIndex( ::sal_Int32 Index ) throw (IndexOutOfBou
}
// XElementAccess
-Type SAL_CALL DisplayAccess::getElementType( ) throw (RuntimeException)
+Type SAL_CALL DisplayAccess::getElementType() throw (RuntimeException)
{
return XPropertySet::static_type();
}
@@ -317,7 +317,7 @@ Type SAL_CALL DisplayAccess::getElementType( ) throw (RuntimeException)
}
// XServiceInfo
-OUString SAL_CALL DisplayAccess::getImplementationName( ) throw (RuntimeException)
+OUString SAL_CALL DisplayAccess::getImplementationName() throw (RuntimeException)
{
return DisplayAccess_getImplementationName();
}
@@ -333,7 +333,7 @@ OUString SAL_CALL DisplayAccess::getImplementationName( ) throw (RuntimeExcepti
return sal_False;
}
-Sequence< OUString > SAL_CALL DisplayAccess::getSupportedServiceNames( ) throw (RuntimeException)
+Sequence< OUString > SAL_CALL DisplayAccess::getSupportedServiceNames() throw (RuntimeException)
{
return DisplayAccess_getSupportedServiceNames();
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index d4e1b1fcfcaa..32d70213aae2 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -270,7 +270,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if( bRTL )
// create a rect that can be compared to desktop coordinates
devRectRTL = pW->ImplOutputToUnmirroredAbsoluteScreenPixel( normRect );
- if( Application::GetScreenCount() > 1 && ! Application::IsMultiDisplay() )
+ if( Application::GetScreenCount() > 1 && Application::IsUnifiedDisplay() )
aScreenRect = Application::GetScreenPosSizePixel(
Application::GetBestScreen( bRTL ? devRectRTL : devRect ) );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 66db82ab792a..31ea5fc169aa 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3726,7 +3726,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong
Size aSz = ImplCalcSize( pWin );
long nMaxHeight = pWin->GetDesktopRectPixel().GetHeight();
- if( Application::GetScreenCount() > 1 && ! Application::IsMultiDisplay() )
+ if( Application::GetScreenCount() > 1 && Application::IsUnifiedDisplay() )
{
Window* pDeskW = pWindow->GetWindow( WINDOW_REALPARENT );
if( ! pDeskW )
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index c9f44f40e451..f087921477d2 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -614,10 +614,8 @@ static rtl::OString ImplWindowStateToStr(const WindowStateData& rData)
void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin )
{
Rectangle aScreenRect;
- if( Application::IsMultiDisplay() )
- {
+ if( !Application::IsUnifiedDisplay() )
aScreenRect = Application::GetScreenPosSizePixel( GetScreenNumber() );
- }
else
{
aScreenRect = Application::GetScreenPosSizePixel( 0 );
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index a5b134e420f2..98c012ad5135 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -104,9 +104,9 @@ unsigned int GtkSalSystem::GetDisplayScreenCount()
return G_MAXINT - nMonitor;
}
-bool GtkSalSystem::IsMultiDisplay()
+bool GtkSalSystem::IsUnifiedDisplay()
{
- return gdk_display_get_n_screens (mpDisplay) > 1;
+ return gdk_display_get_n_screens (mpDisplay) == 1;
}
namespace {
diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx
index 522aeecfae85..c2c7388cdef7 100644
--- a/vcl/unx/x11/x11sys.cxx
+++ b/vcl/unx/x11/x11sys.cxx
@@ -60,11 +60,11 @@ unsigned int X11SalSystem::GetDisplayScreenCount()
return pSalDisp->IsXinerama() ? pSalDisp->GetXineramaScreens().size() : pSalDisp->GetScreenCount();
}
-bool X11SalSystem::IsMultiDisplay()
+bool X11SalSystem::IsUnifiedDisplay()
{
SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay();
unsigned int nScreenCount = pSalDisp->GetScreenCount();
- return pSalDisp->IsXinerama() ? false : (nScreenCount > 1);
+ return pSalDisp->IsXinerama() ? true : (nScreenCount == 1);
}
unsigned int X11SalSystem::GetDefaultDisplayNumber()