vcl/unx/gtk3/gtk3gtkframe.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit e30caebf76ccd088840b870ecb8929ce132baed0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Feb 14 17:08:04 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Feb 14 20:57:46 2020 +0100 don't use gtk_window_group_remove_window if widgets are not GtkWindows Change-Id: I80d01f29091d7cc06e82295e781ef7a53fb7776b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88739 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 118c77f9f7b3..ee32281378be 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -2252,19 +2252,22 @@ const SystemEnvData* GtkSalFrame::GetSystemData() const void GtkSalFrame::SetParent( SalFrame* pNewParent ) { + GtkWindow* pWindow = GTK_IS_WINDOW(m_pWindow) ? GTK_WINDOW(m_pWindow) : nullptr; if (m_pParent) { - gtk_window_group_remove_window(gtk_window_get_group(GTK_WINDOW(m_pParent->m_pWindow)), GTK_WINDOW(m_pWindow)); + if (pWindow && GTK_IS_WINDOW(m_pParent->m_pWindow)) + gtk_window_group_remove_window(gtk_window_get_group(GTK_WINDOW(m_pParent->m_pWindow)), pWindow); m_pParent->m_aChildren.remove(this); } m_pParent = static_cast<GtkSalFrame*>(pNewParent); if (m_pParent) { m_pParent->m_aChildren.push_back(this); - gtk_window_group_add_window(gtk_window_get_group(GTK_WINDOW(m_pParent->m_pWindow)), GTK_WINDOW(m_pWindow)); + if (pWindow && GTK_IS_WINDOW(m_pParent->m_pWindow)) + gtk_window_group_add_window(gtk_window_get_group(GTK_WINDOW(m_pParent->m_pWindow)), pWindow); } - if( ! isChild() ) - gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), + if (!isChild() && pWindow) + gtk_window_set_transient_for( pWindow, (m_pParent && ! m_pParent->isChild(true,false)) ? GTK_WINDOW(m_pParent->m_pWindow) : nullptr ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits