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@redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 95de139a..94f2a15 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 b930e7a..b35121b 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()));