summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-04-16 08:23:12 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-04-16 08:28:02 (GMT)
commit125252e1c85889295311a0e20d9edec2498c4aca (patch)
treeae4ba6736d94e42b8d88bdd171e72e035903fbd7 /src/gui/kernel/qcocoaview_mac.mm
parent063a1b16582a03dee72f889cc126745eaca66464 (diff)
downloadQt-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
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm4
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.