diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-06-26 16:29:19 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-06-29 10:13:39 +0000 |
commit | 85cbd3517826b28b429f4239158512e14c009f9a (patch) | |
tree | a0497f02e91eb722bbfe2008345fcf5c54888dae /src/plugins/platforms/cocoa/qnswindow.mm | |
parent | c888d302bc4ae3b2970c6db188c7276b3c831cc7 (diff) |
macOS: Remove workaround for queued input events to stale windows
We now track the platform window with a QPointer, so the event callbacks
can (and do) check the validity of the platform window before passing
them on. The window property of the NSView is also nil at the point of
even delivery, if we need another way to check if the event is still
valid.
Task-number: QTBUG-39211
Change-Id: I6179bdb3af9606cd0abf981c0fe6cacb9a2d98ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindow.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qnswindow.mm | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm index 588a91b944..df9e7b8067 100644 --- a/src/plugins/platforms/cocoa/qnswindow.mm +++ b/src/plugins/platforms/cocoa/qnswindow.mm @@ -147,15 +147,7 @@ static bool isMouseEvent(NSEvent *ev) - (void)clearWindow { - if (_window) { - QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher()); - if (cocoaEventDispatcher) { - QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher)); - cocoaEventDispatcherPrivate->removeQueuedUserInputEvents([_window windowNumber]); - } - - _window = nil; - } + _window = nil; } - (void)dealloc |