Cocoa: Enable touch on 0->1 counter transition.

Change-Id: I9d8fb84851a866c3020cbbca13d5b2dc297cfe65
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
bb10
Morten Johan Sørvig 2013-04-12 11:43:53 +02:00 committed by The Qt Project
parent fd038dc53a
commit 2da29c9736
1 changed files with 1 additions and 1 deletions

View File

@ -905,7 +905,7 @@ QCocoaMenuBar *QCocoaWindow::menubar() const
void QCocoaWindow::registerTouch(bool enable)
{
m_registerTouchCount += enable ? 1 : -1;
if (m_registerTouchCount == 1)
if (enable && m_registerTouchCount == 1)
[m_contentView setAcceptsTouchEvents:YES];
else if (m_registerTouchCount == 0)
[m_contentView setAcceptsTouchEvents:NO];