[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 9 07:57:55 UTC 2021
vcl/source/app/salvtables.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit ad980a729fa5773c12339452518aa7c4e56f1fb5
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 8 15:37:40 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Jul 9 09:57:22 2021 +0200
SetParentToDefaultWindow doesn't change parent anymore
but for SalInstanceContainer::move with a null destination
we do want to move the widget out of the parent to 'somewhere else'
and vcl (unlike gtk) will complain if the new parent is null
so continue to use the DefaultWindow as the temporary home.
Change-Id: I3d738c11c3a1c07402d1a926d890caf3e657bca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118652
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2b1908f55834..1bab62fdf101 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1212,10 +1212,14 @@ void SalInstanceContainer::move(weld::Widget* pWidget, weld::Container* pNewPare
assert(pVclWidget);
SalInstanceContainer* pNewVclParent = dynamic_cast<SalInstanceContainer*>(pNewParent);
assert(!pNewParent || pNewVclParent);
+ vcl::Window* pVclWindow = pVclWidget->getWidget();
if (pNewVclParent)
- pVclWidget->getWidget()->SetParent(pNewVclParent->getWidget());
+ pVclWindow->SetParent(pNewVclParent->getWidget());
else
- pVclWidget->getWidget()->SetParentToDefaultWindow();
+ {
+ pVclWindow->Hide();
+ pVclWindow->SetParent(ImplGetDefaultWindow());
+ }
}
void SalInstanceContainer::child_grab_focus()
More information about the Libreoffice-commits
mailing list