[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 27 19:11:33 UTC 2021
vcl/source/app/salvtables.cxx | 5 +++--
vcl/source/app/weldutils.cxx | 4 +---
2 files changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 618cb39b558b7e3f9a6f2aa8cf0a935602118388
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Mar 27 16:20:43 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Mar 27 20:10:49 2021 +0100
tdf#141141 sync SalFrame::GetFrameWeld and weld::GetPopupParent
so they both use the same FrameWindow
Change-Id: I7c58a4f2c8e82abc45eaf1dfee8eb2720503ecc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113209
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 95de139a53bc..94f2a159577a 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -7145,10 +7145,11 @@ weld::Window* SalFrame::GetFrameWeld() const
if (!m_xFrameWeld)
{
vcl::Window* pWindow = GetWindow();
- pWindow = pWindow ? pWindow->ImplGetWindow() : nullptr;
- assert(!pWindow || (pWindow->IsSystemWindow() || pWindow->IsDockingWindow()));
if (pWindow)
+ {
+ assert(pWindow == pWindow->GetFrameWindow());
m_xFrameWeld.reset(new SalInstanceWindow(pWindow, nullptr, false));
+ }
}
return m_xFrameWeld.get();
}
diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx
index b930e7a02187..b35121b78850 100644
--- a/vcl/source/app/weldutils.cxx
+++ b/vcl/source/app/weldutils.cxx
@@ -605,9 +605,7 @@ weld::Window* GetPopupParent(vcl::Window& rOutWin, tools::Rectangle& rRect)
rRect.SetPos(rOutWin.OutputToScreenPixel(rRect.TopLeft()));
rRect = FloatingWindow::ImplConvertToAbsPos(&rOutWin, rRect);
- vcl::Window* pWin = &rOutWin;
- while (!pWin->IsTopWindow())
- pWin = pWin->GetParent();
+ vcl::Window* pWin = rOutWin.GetFrameWindow();
rRect = FloatingWindow::ImplConvertToRelPos(pWin, rRect);
rRect.SetPos(pWin->ScreenToOutputPixel(rRect.TopLeft()));
More information about the Libreoffice-commits
mailing list