From ca93d98343a03026c7568abc2ddda838f10fcbde Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Sat, 14 Jan 2012 10:31:40 +0000 Subject: vcl: rename ambiguous IsMultiDisplay to IsUnifiedDisplay, and simplify --- vcl/aqua/source/app/salsys.cxx | 10 -------- vcl/headless/svpdummies.cxx | 10 -------- vcl/inc/aqua/salsys.h | 2 -- vcl/inc/headless/svpdummies.hxx | 2 -- vcl/inc/ios/salsys.h | 2 -- vcl/inc/salsys.hxx | 12 +++++----- vcl/inc/unx/gtk/gtkdata.hxx | 1 - vcl/inc/unx/gtk/gtksys.hxx | 2 +- vcl/inc/unx/x11/x11sys.hxx | 2 +- vcl/inc/vcl/svapp.hxx | 14 +++++------ vcl/inc/win/salsys.h | 1 - vcl/ios/source/app/salsys.cxx | 10 -------- vcl/source/app/svapp.cxx | 6 ++--- vcl/source/components/display.cxx | 50 +++++++++++++++++++-------------------- vcl/source/window/floatwin.cxx | 2 +- vcl/source/window/menu.cxx | 2 +- vcl/source/window/syswin.cxx | 4 +--- vcl/unx/gtk/app/gtksys.cxx | 4 ++-- vcl/unx/x11/x11sys.cxx | 4 ++-- 19 files changed, 50 insertions(+), 90 deletions(-) (limited to 'vcl') diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx index d85f7ae38934..0c67ccfec620 100644 --- a/vcl/aqua/source/app/salsys.cxx +++ b/vcl/aqua/source/app/salsys.cxx @@ -51,16 +51,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 a111e3fa241e..3bdfd900efb4 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -282,16 +282,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 fbc7bb4fe743..92114c5ef492 100644 --- a/vcl/ios/source/app/salsys.cxx +++ b/vcl/ios/source/app/salsys.cxx @@ -51,16 +51,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 16381ead93ea..4df93e8f5914 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1258,10 +1258,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() @@ -1295,7 +1295,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 41368f7f903c..24516208ed4b 100644 --- a/vcl/source/components/display.cxx +++ b/vcl/source/components/display.cxx @@ -58,7 +58,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); @@ -67,14 +67,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; @@ -92,7 +92,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; } @@ -129,7 +129,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 ) ); @@ -152,7 +152,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")); } @@ -168,7 +168,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); @@ -182,7 +182,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); @@ -191,7 +191,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); @@ -200,13 +200,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() @@ -229,11 +229,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; } @@ -246,9 +246,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 ) ) { @@ -266,17 +266,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 ) ) @@ -286,7 +286,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 ); } @@ -305,7 +305,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(); } @@ -316,7 +316,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(); } @@ -332,7 +332,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 baa6bdb6105f..15b5cac1d13d 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() -- cgit v1.2.3