[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Consume all events in the event queue to avoid application lockups (#300)

Guille Polito notifications at github.com
Wed Oct 31 09:51:15 UTC 2018


It seems that "peeking" from the event queue does not yield events in case of changing resolutions:

```
NSApp nextEventMatchingMask:NSEventMaskAny
                             untilDate:nil
                             inMode:NSEventTrackingRunLoopMode
                             dequeue: ***NO***
```

And then it never enters the loop...

Of course, apple's doc says nothing about this: https://developer.apple.com/documentation/appkit/nsapplication/1428485-nexteventmatchingmask?language=objc
So all this is speculation ^^.

This new version consumes all pending events in the NSApp, and it does not show any lockups when e.g., switching resolutions. If the event does not correspond to this window, we take it from the event queue anyways and re-post it afterwards, to give other windows the opportunity to consume their events.
You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300

-- Commit Summary --

  * Consume all events in the event queue to avoid application lockups

-- File Changes --

    M platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m (50)

-- Patch Links --

https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300.patch
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181031/76328f45/attachment-0001.html>


More information about the Vm-dev mailing list