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>
This commit is contained in:
Timur Pocheptsov 2016-04-13 12:58:54 +02:00 committed by Shawn Rutledge
parent ba30566b25
commit f942d82d14

View File

@ -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)