Kaydet (Commit) 88fc17e4 authored tarafından Caolán McNamara's avatar Caolán McNamara

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: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst febe0fd1
...@@ -1935,6 +1935,23 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect ...@@ -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_window_set_fullscreen_mode( widget_get_window(m_pWindow), m_bSpanMonitorsWhenFullscreen
? GDK_FULLSCREEN_ON_ALL_MONITORS : GDK_FULLSCREEN_ON_CURRENT_MONITOR ); ? 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; GtkWidget* pMenuBarContainerWidget = m_pSalMenu ? m_pSalMenu->GetMenuBarContainerWidget() : nullptr;
if( eType == SetType::Fullscreen ) if( eType == SetType::Fullscreen )
{ {
...@@ -1946,7 +1963,6 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect ...@@ -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); gtk_window_fullscreen_on_monitor(GTK_WINDOW(m_pWindow), pScreen, nMonitor);
} }
} }
else if( eType == SetType::UnFullscreen ) else if( eType == SetType::UnFullscreen )
{ {
...@@ -1954,23 +1970,6 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect ...@@ -1954,23 +1970,6 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect
gtk_widget_show(pMenuBarContainerWidget); gtk_widget_show(pMenuBarContainerWidget);
gtk_window_unfullscreen( GTK_WINDOW( m_pWindow ) ); 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 ) void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment