vcl/osx/salframe.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit bf2cf747303d1485fac44e0d7250541094fe9724
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Wed May 10 16:15:03 2023 -0400
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Wed May 10 23:26:59 2023 +0200

    tdf#152173 Don't display tooltip windows when mousing over non-key windows
    
    Don't display tooltips when mousing over non-key windows even if the
    application is active as the tooltip window will pull the non-key
    window in front of the key window.
    
    Change-Id: I425b9af09de0272ebee84a218e2e5ae8c200a4e5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151646
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <plub...@neooffice.org>

diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 686f346fb54f..ea514b786ada 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -462,7 +462,10 @@ void AquaSalFrame::Show(bool bVisible, bool bNoActivate)
     // parent window (to ensure that the tooltip is above the parent window),
     // displaying a tooltip pulls the parent window in front of the windows
     // of all other inactive applications.
-    if (bVisible && (mnStyle & SalFrameStyleFlags::TOOLTIP) && ![NSApp 
isActive])
+    // Also, don't display tooltips when mousing over non-key windows even if
+    // the application is active as the tooltip window will pull the non-key
+    // window in front of the key window.
+    if (bVisible && (mnStyle & SalFrameStyleFlags::TOOLTIP) && (![NSApp 
isActive] || (mpParent && ![ mpParent->mpNSWindow isKeyWindow])))
         return;
 
     mbShown = bVisible;

Reply via email to