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
Patch Links:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Consume all events in the event queue to avoid application lockups (#300)"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Consume all events in the event queue to avoid application lockups (#300)",
"sections": [
{
"text": "",
"activityTitle": "**Guille Polito**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@guillep",
"facts": [
]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "b6cb192",
"value": "Consume all events in the event queue to avoid application lockups"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m](https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300/files#diff-0) (50 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 300,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"pullRequestId\": 300\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/300.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 403624809\n}"
}
],
"themeColor": "26292E"
}
]</script>