[Libreoffice-commits] core.git: vcl/osx

Thorsten Wagner (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 2 09:01:33 UTC 2020


 vcl/osx/salnativewidgets.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 4b1ecab984dc46ad7dfdd8a071c94553a6c03633
Author:     Thorsten Wagner <thorsten.wagner.4 at gmail.com>
AuthorDate: Sat Aug 1 19:49:38 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Aug 2 11:00:57 2020 +0200

    tdf#133564: Text coloring of buttons within non key windows on macOS amended
    
    Change-Id: I815fcf82440a7e5d14ae457cc659a5fe6a9f8c52
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99946
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 230735401993..d50c3956cdf6 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -232,7 +232,12 @@ bool AquaSalGraphics::hitTestNativeControl(ControlType nType, ControlPart nPart,
 
 UInt32 AquaSalGraphics::getState(ControlState nState)
 {
-    const bool bDrawActive = mpFrame == nullptr || [mpFrame->getNSWindow() isKeyWindow];
+
+    // there are non key windows which are childs of key windows, e.g. autofilter configuration dialog or sidebar dropdown dialogs.
+    // To handle these windows correctly, parent frame's key window state is considered here additionally.
+
+    const bool bDrawActive = mpFrame == nullptr || [mpFrame->getNSWindow() isKeyWindow]
+                             || (mpFrame->mpParent != nullptr && [mpFrame->mpParent->getNSWindow() isKeyWindow]);
     if (!(nState & ControlState::ENABLED) || !bDrawActive)
     {
         return kThemeStateInactive;


More information about the Libreoffice-commits mailing list