[Libreoffice-commits] core.git: vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 20 12:10:06 UTC 2018
vcl/unx/gtk3/gtk3gtkframe.cxx | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
New commits:
commit 88fc17e473ce2d3e8a7eae4235446a75eb9e91a2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Dec 20 10:28:55 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 20 13:09:41 2018 +0100
Resolves: tdf#119688 under X full-screen doesn't work before gtk_widget_show
Change-Id: I3ba29a235c8c5807e79e83dd1eb65b99f1dfa9cf
Reviewed-on: https://gerrit.libreoffice.org/65476
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 091f4d2d3b3f..5e471212965c 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1935,6 +1935,23 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect
gdk_window_set_fullscreen_mode( widget_get_window(m_pWindow), m_bSpanMonitorsWhenFullscreen
? GDK_FULLSCREEN_ON_ALL_MONITORS : GDK_FULLSCREEN_ON_CURRENT_MONITOR );
+ if( eType == SetType::UnFullscreen &&
+ !(m_nStyle & SalFrameStyleFlags::SIZEABLE) )
+ gtk_window_set_resizable( GTK_WINDOW( m_pWindow ), FALSE );
+
+ // FIXME: we should really let gtk+ handle our widget hierarchy ...
+ if( m_pParent && gtk_widget_get_screen( m_pParent->m_pWindow ) != pScreen )
+ SetParent( nullptr );
+ std::list< GtkSalFrame* > aChildren = m_aChildren;
+ for (auto const& child : aChildren)
+ child->SetScreen( nNewScreen, SetType::RetainSize );
+
+ m_bDefaultPos = m_bDefaultSize = false;
+ updateScreenNumber();
+
+ if( bVisible )
+ Show( true );
+
GtkWidget* pMenuBarContainerWidget = m_pSalMenu ? m_pSalMenu->GetMenuBarContainerWidget() : nullptr;
if( eType == SetType::Fullscreen )
{
@@ -1946,7 +1963,6 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect
{
gtk_window_fullscreen_on_monitor(GTK_WINDOW(m_pWindow), pScreen, nMonitor);
}
-
}
else if( eType == SetType::UnFullscreen )
{
@@ -1954,23 +1970,6 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect
gtk_widget_show(pMenuBarContainerWidget);
gtk_window_unfullscreen( GTK_WINDOW( m_pWindow ) );
}
-
- if( eType == SetType::UnFullscreen &&
- !(m_nStyle & SalFrameStyleFlags::SIZEABLE) )
- gtk_window_set_resizable( GTK_WINDOW( m_pWindow ), FALSE );
-
- // FIXME: we should really let gtk+ handle our widget hierarchy ...
- if( m_pParent && gtk_widget_get_screen( m_pParent->m_pWindow ) != pScreen )
- SetParent( nullptr );
- std::list< GtkSalFrame* > aChildren = m_aChildren;
- for (auto const& child : aChildren)
- child->SetScreen( nNewScreen, SetType::RetainSize );
-
- m_bDefaultPos = m_bDefaultSize = false;
- updateScreenNumber();
-
- if( bVisible )
- Show( true );
}
void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
More information about the Libreoffice-commits
mailing list