vcl/source/app/weldutils.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f92897cfcd6ea9a57bbeec792733111eb49e7dc5
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Jul 31 16:29:23 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Jul 31 20:38:28 2024 +0200

    Resolves: tdf#162278 get popup position relative to the dest parent
    
    since:
    
    commit 85511e27d259d6b19cc6c463fc06368c14511bb8
    Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
    AuthorDate: Sat Jul 27 20:25:35 2024 +0100
    
        Resolves: tdf#160509 use BorderWindow client for dialog parent
    
    we now use the clientwindow of toplevel frames as the parent window to
    use as the parent for dialogs/etc so we get the right SystemWindow for
    dialogs.
    
    So we need to also adjust the calculation of where we put child popups
    of such toplevel frames to be relative to the clientwindow instead of
    borderwindow
    
    Change-Id: I896e75a5ad709a51a445dc1be2c0fb9f985f01a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171330
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx
index 6ab024953b01..6a5753d5a785 100644
--- a/vcl/source/app/weldutils.cxx
+++ b/vcl/source/app/weldutils.cxx
@@ -610,6 +610,8 @@ weld::Window* GetPopupParent(vcl::Window& rOutWin, 
tools::Rectangle& rRect)
     AbsoluteScreenPixelRectangle aRectAbs = 
FloatingWindow::ImplConvertToAbsPos(&rOutWin, rRect);
 
     vcl::Window* pWin = rOutWin.GetFrameWindow();
+    // resolve from a possible BorderWindow to the ClientWindow (returns 
itself if not)
+    pWin = pWin->ImplGetWindow();
 
     rRect = FloatingWindow::ImplConvertToRelPos(pWin, aRectAbs);
     rRect.SetPos(pWin->ScreenToOutputPixel(rRect.TopLeft()));

Reply via email to