summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-04-13 12:58:54 +0200
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-04-13 19:45:37 +0000
commitf942d82d143a69c34ac769cf201690941d8db648 (patch)
treec6f737671251351cc7d2a403afc76d7a4d94d502
parentba30566b259e5f4282697be9a4e31940bebfd55b (diff)
Cocoa integration - invert 'masked out event' logic
If a mask region contains a point - the event is _not_ masked out. Task-number: QTBUG-52533 Change-Id: I56d0276f5e3853479c2687addb95c2600edd3cda Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index a2e3b9a949..12629700ec 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -844,7 +844,7 @@ QT_WARNING_POP
Q_UNUSED(qtScreenPoint);
// Maintain masked state for the button for use by MouseDragged and MouseUp.
- const bool masked = m_maskRegion.contains(qtWindowPoint.toPoint());
+ const bool masked = [self hasMask] && !m_maskRegion.contains(qtWindowPoint.toPoint());
if (masked)
m_acceptedMouseDowns &= ~button;
else
@@ -950,7 +950,7 @@ QT_WARNING_POP
[self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
Q_UNUSED(qtScreenPoint);
- bool masked = m_maskRegion.contains(qtWindowPoint.toPoint());
+ const bool masked = [self hasMask] && !m_maskRegion.contains(qtWindowPoint.toPoint());
// Maintain masked state for the button for use by MouseDragged and Up.
if (masked)