An attempt to fix the "double click" bug on MacOS#448
Draft
eriksvedang wants to merge 3 commits intonot-fl3:masterfrom
Draft
An attempt to fix the "double click" bug on MacOS#448eriksvedang wants to merge 3 commits intonot-fl3:masterfrom
eriksvedang wants to merge 3 commits intonot-fl3:masterfrom
Conversation
Contributor
|
Oh, so it was a bug, and not me constantly misclicking. |
|
I ran into this exact problem today and I am able to reproduce it in my app with the method you suggested (moving the cursor around). I'm going to try build my app with this branch and see if it resolves the problem. If yes, I'll see what feedback I can provide to help get this (or a similar PR) merged in. Not sure what help I can be besides being another tester though. |
birhburh
added a commit
to birhburh/miniquad
that referenced
this pull request
Apr 14, 2025
Based on @pherrymason suggestion in not-fl3#422 #fixes 422 #fixes 524 Probably makes not-fl3#448 not needed anymore also
not-fl3
pushed a commit
that referenced
this pull request
Apr 14, 2025
Based on @pherrymason suggestion in #422 #fixes 422 #fixes 524 Probably makes #448 not needed anymore also
BeaconBrigade
pushed a commit
to BeaconBrigade/miniquad
that referenced
this pull request
Jan 21, 2026
Based on @pherrymason suggestion in not-fl3#422 #fixes 422 #fixes 524 Probably makes not-fl3#448 not needed anymore also
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here's my attempt at solving the bug described here not-fl3/macroquad#422
The way to reliably (100%) reproduce the bug on MacOS is to launch the program from the command line, and constantly move the cursor around the screen while the program is starting (adding a call to
sleepat the beginning of the program makes this easier to perform).This PR uses the method call
[[NSRunningApplication currentApplication] activateWithOptions]which is documented here: https://developer.apple.com/documentation/appkit/nsrunningapplication/1528725-activatewithoptionsIn my testing, the game window is still inactive (gray) after this code has been called, but the double click bug described in the original issue is gone after clicking the window once. That the window actually doesn't get active (which one would assume...) implies that there's more room for improvement here, since the method call actually doesn't make the window active. But the user experience with this fix is at least a lot better than the current behaviour.
If this fix is good enough and we want to merge it in, I'd need some help to decide where the best place to actually call
prevent_double_click_bug_on_macosfunction from (right now I manually call it in my test program).