[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 9 07:58:22 UTC 2021
vcl/source/app/salvtables.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 5dbcf65d6999c835ac750a216f46ffe585f9018e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 8 15:37:40 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 9 09:57:40 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/+/118650
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2a93a80711de..1dd49323e90d 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