summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
diff options
context:
space:
mode:
authorDyami Caliri <dyami@dragonframe.com>2014-05-22 15:19:46 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-03 17:25:36 +0200
commitac7bf97f51837eecc5e5570d5d62996746f378ed (patch)
tree3284c7d949df84469e15fb2567b02e09455e9fa9 /src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
parent70e4428b6f1c6a4bad112203f67ee7d22107616c (diff)
Cocoa: clear queued user input events when window is destroyed
QCocoaEventDispatcher stores user input events in a queue in certain cases. If the target of those events is destroyed, the events are later sent to the stale window, causing a crash. Task-number: QTBUG-39211 Change-Id: Ie55d2df5697c742bcb644ebf8c5028015a0b8148 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaeventdispatcher.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
index 33d7dcbcf4..dc0b8fcc18 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
@@ -178,6 +178,8 @@ public:
void maybeCancelWaitForMoreEvents();
void ensureNSAppInitialized();
+ void removeQueuedUserInputEvents(int nsWinNumber);
+
QCFSocketNotifier cfSocketNotifier;
QList<void *> queuedUserInputEvents; // NSEvent *
CFRunLoopSourceRef postedEventsSource;