[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara caolanm at redhat.com
Thu Mar 10 09:40:00 UTC 2016


 vcl/unx/gtk3/gtk3gtkframe.cxx |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 68d200f490a7a21c365bf43c710c46a87f84483d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 10 09:38:48 2016 +0000

    gtk3: set decoration bits etc before realize
    
    cause wayland is sticking a title bar into the toolbars otherwise, sigh
    
    Change-Id: Id012e9508cc0dfafbda344974a96d8a038c6c9f4

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 9c88506..1e69fe3 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1221,8 +1221,6 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
         m_pParent->m_aChildren.push_back( this );
     }
 
-    InitCommon();
-
     // set window type
     bool bDecoHandling =
         ! isChild() &&
@@ -1252,10 +1250,13 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
         }
         gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
         gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
+        gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) );
     }
     else if( (nStyle & SalFrameStyleFlags::FLOAT) )
         gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), GDK_WINDOW_TYPE_HINT_POPUP_MENU );
 
+    InitCommon();
+
     if( eWinType == GTK_WINDOW_TOPLEVEL )
     {
 #ifdef ENABLE_GMENU_INTEGRATION
@@ -1264,13 +1265,6 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
 #endif
 
     }
-
-    if( bDecoHandling )
-    {
-        gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) );
-        if( ( (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION)) ) )
-            gtk_window_set_accept_focus(GTK_WINDOW(m_pWindow), false);
-    }
 }
 
 GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )


More information about the Libreoffice-commits mailing list