summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-12-20 10:28:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-20 13:09:41 +0100
commit88fc17e473ce2d3e8a7eae4235446a75eb9e91a2 (patch)
treebaf01580bf1a1e144d478e799eee29561232af04 /vcl
parentfebe0fd100ff0bff33c965b3bcb497e7f2bc4ef9 (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx35
1 files changed, 17 insertions, 18 deletions
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 )