summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Luby <plubius@@users.noreply.github.com>2023-05-04 09:45:09 -0400
committerPatrick Luby <plubius@neooffice.org>2023-05-05 15:33:45 +0200
commitb6c0738f2a1906c2b5a967793e9b065a1b43d75e (patch)
treec96da0ef3181126a34066352e2b6e19b682d141b
parent9d01cf26715b1274fbe5f94f87a8ab8bcd90a85a (diff)
tdf#152173 Don't display tooltip windows when application is inactive
Starting with macOS 13 Ventura, inactive applications receive mouse move events so when LibreOffice is inactive, a mouse move event causes a tooltip to be displayed. Since the tooltip window is attached to its 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. Change-Id: I35caf480a8afb42694957a4a6c2bec20be591ef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151394 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> (cherry picked from commit 3bc7cc14706f47d740dfc5715970054922ca470c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151373
-rw-r--r--vcl/osx/salframe.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 4c9f891881eb..c26af90c1f8a 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -455,6 +455,16 @@ void AquaSalFrame::Show(bool bVisible, bool bNoActivate)
OSX_SALDATA_RUNINMAIN( Show(bVisible, bNoActivate) )
+ // tdf#152173 Don't display tooltip windows when application is inactive
+ // Starting with macOS 13 Ventura, inactive applications receive mouse
+ // move events so when LibreOffice is inactive, a mouse move event causes
+ // a tooltip to be displayed. Since the tooltip window is attached to its
+ // 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])
+ return;
+
mbShown = bVisible;
if(bVisible)
{