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 <caol...@redhat.com> AuthorDate: Sat Mar 27 16:20:43 2021 +0000 Commit: Caolán McNamara <caol...@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 <caol...@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())); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits