Cocoa: Send mouse release as a right button when clicking right button

Task-number: QTBUG-43612
Change-Id: Id6c764be13527e6b15255b509b4d43b8fe1b54d8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
Andy Shaw 2015-03-12 11:38:07 +01:00 committed by Timur Pocheptsov
parent ba440f35e1
commit adc3ef97d7

View File

@ -927,6 +927,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
if (m_window->flags() & Qt::WindowTransparentForInput)
return [super rightMouseDown:theEvent];
m_buttons |= Qt::RightButton;
m_sendUpAsRightButton = true;
[self handleMouseEvent:theEvent];
}
@ -944,6 +945,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
if (m_window->flags() & Qt::WindowTransparentForInput)
return [super rightMouseUp:theEvent];
m_buttons &= ~Qt::RightButton;
m_sendUpAsRightButton = false;
[self handleMouseEvent:theEvent];
}