diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-04-16 08:23:12 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-04-16 08:28:02 (GMT) |
commit | 125252e1c85889295311a0e20d9edec2498c4aca (patch) | |
tree | ae4ba6736d94e42b8d88bdd171e72e035903fbd7 | |
parent | 063a1b16582a03dee72f889cc126745eaca66464 (diff) | |
download | Qt-125252e1c85889295311a0e20d9edec2498c4aca.zip Qt-125252e1c85889295311a0e20d9edec2498c4aca.tar.gz Qt-125252e1c85889295311a0e20d9edec2498c4aca.tar.bz2 |
Fix a bug that made it hard to click the top items in a list widget
Our "view under tranparent view" function was sound, but it didn't take
into consideration that fact that views in the hierarchy could be
hidden. This is most prominent when you have a QFocusFrame over a
QAbstractScrollArea.
Task-number: 251008
Reviewed-by: Morten Sørvig
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 7668d66..e84af90 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -630,7 +630,7 @@ extern "C" { for (NSView *lookView in viewsToLookAt) { NSPoint tmpPoint = [lookView convertPoint:windowPoint fromView:nil]; for (NSView *view in [lookView subviews]) { - if (view == mouseView) + if (view == mouseView || [view isHidden]) continue; NSRect frameRect = [view frame]; if (NSMouseInRect(tmpPoint, [view frame], [view isFlipped])) @@ -649,7 +649,7 @@ extern "C" { NSPoint tmpPoint = [viewForDescent convertPoint:windowPoint fromView:nil]; // Apply same rule as above wrt z-order. for (NSView *view in [viewForDescent subviews]) { - if (NSMouseInRect(tmpPoint, [view frame], [view isFlipped])) + if (![view isHidden] && NSMouseInRect(tmpPoint, [view frame], [view isFlipped])) lowerView = view; } if (!lowerView) // Low as we can be at this point. |