summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorThorsten Wagner <thorsten.wagner.4@gmail.com>2020-08-01 19:49:38 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-08-02 11:00:57 +0200
commit4b1ecab984dc46ad7dfdd8a071c94553a6c03633 (patch)
tree9dff94c9d9a4189e49d79936ffb92c411d67e29f /vcl/osx
parent7b78aaf0176d527c12fcbdd6d755cf98d7330c0c (diff)
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@gmail.com>
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salnativewidgets.cxx7
1 files changed, 6 insertions, 1 deletions
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;