[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/unx

Caolán McNamara caolanm at redhat.com
Fri Jun 19 05:26:56 PDT 2015


 vcl/unx/gtk/window/gtksalframe.cxx |   28 ----------------------------
 1 file changed, 28 deletions(-)

New commits:
commit 9377cf0f5bdfbbc43c32699abc079e37cbf7aef5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 19 13:18:58 2015 +0100

    gtk3: get rid of this incorrectly gtk3-only positioning limits holdover
    
    its clearly accidental to do this only for gtk3, left over from various
    screen/xinerama untangling efforts
    
    Change-Id: Ic91f41fad5748f68fbefca1d6798fef6e2efe469
    (cherry picked from commit 109d1d193c959209846337f6fbdac3c588a9eb92)

diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index e687d2b..4f0ab1f 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -2094,34 +2094,6 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
             nY += m_pParent->maGeometry.nY;
         }
 
-#if GTK_CHECK_VERSION(3,0,0)
-        // adjust position to avoid off screen windows
-        // but allow toolbars to be positioned partly off screen by the user
-        Size aScreenSize = getDisplay()->GetScreenSize( GetDisplayScreen() );
-        if( ! (m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
-        {
-            if( nX < (long)maGeometry.nLeftDecoration )
-                nX = maGeometry.nLeftDecoration;
-            if( nY < (long)maGeometry.nTopDecoration )
-                nY = maGeometry.nTopDecoration;
-            if( (nX + (long)maGeometry.nWidth + (long)maGeometry.nRightDecoration) > (long)aScreenSize.Width() )
-                nX = aScreenSize.Width() - maGeometry.nWidth - maGeometry.nRightDecoration;
-            if( (nY + (long)maGeometry.nHeight + (long)maGeometry.nBottomDecoration) > (long)aScreenSize.Height() )
-                nY = aScreenSize.Height() - maGeometry.nHeight - maGeometry.nBottomDecoration;
-        }
-        else
-        {
-            if( nX + (long)maGeometry.nWidth < 10 )
-                nX = 10 - (long)maGeometry.nWidth;
-            if( nY + (long)maGeometry.nHeight < 10 )
-                nY = 10 - (long)maGeometry.nHeight;
-            if( nX > (long)aScreenSize.Width() - 10 )
-                nX = (long)aScreenSize.Width() - 10;
-            if( nY > (long)aScreenSize.Height() - 10 )
-                nY = (long)aScreenSize.Height() - 10;
-        }
-#endif
-
         if( nX != maGeometry.nX || nY != maGeometry.nY )
             bMoved = true;
         maGeometry.nX = nX;


More information about the Libreoffice-commits mailing list