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:
parent
ba30566b25
commit
f942d82d14
@ -844,7 +844,7 @@ QT_WARNING_POP
|
|||||||
Q_UNUSED(qtScreenPoint);
|
Q_UNUSED(qtScreenPoint);
|
||||||
|
|
||||||
// Maintain masked state for the button for use by MouseDragged and MouseUp.
|
// 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)
|
if (masked)
|
||||||
m_acceptedMouseDowns &= ~button;
|
m_acceptedMouseDowns &= ~button;
|
||||||
else
|
else
|
||||||
@ -950,7 +950,7 @@ QT_WARNING_POP
|
|||||||
[self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
|
[self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
|
||||||
Q_UNUSED(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.
|
// Maintain masked state for the button for use by MouseDragged and Up.
|
||||||
if (masked)
|
if (masked)
|
||||||
|
Loading…
Reference in New Issue
Block a user