-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac exports on steam require double click to use left mouse button #68745
Comments
Is it an issue if you run the |
Also, are "semaphore" buttons in the window title bar grayed out when it's happening? |
Yeah it works fine running it from the finder
Sorry what do you mean by semaphore buttons? |
yes they are grayed out, and if I move the cursor outside and click the bar it fixes the problem |
OK, it seems to be the same issue, but now it's manifesting when you run the executable directly even if it's bundled (on previous OS versions it was doing in only for unbundled apps and when running from terminal). Firstly, Steam config for the game should specify the path to the bundle instead of the executable, e.g.,
This is working with non-Steam shortcuts added to Steam. Also, try the following patch (I have briefly tested it, and it seems to work, but I do not what API Steam is using, so it might need more testing). diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index cc9b9287ed..61b6a73bec 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -195,7 +195,9 @@ static NSCursor *cursorFromSelector(SEL selector, SEL fallback = nil) {
- (void)applicationDidFinishLaunching:(NSNotification *)notice {
NSString *nsappname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
- if (nsappname == nil || isatty(STDOUT_FILENO) || isatty(STDIN_FILENO) || isatty(STDERR_FILENO)) {
+ NSString *nsbundleid_env = [NSString stringWithUTF8String:getenv("__CFBundleIdentifier")];
+ NSString *nsbundleid = [[NSBundle mainBundle]bundleIdentifier];
+ if (nsappname == nil || isatty(STDOUT_FILENO) || isatty(STDIN_FILENO) || isatty(STDERR_FILENO) || ![nsbundleid isEqualToString:nsbundleid_env]) {
// If the executable is started from terminal or is not bundled, macOS WindowServer won't register and activate app window correctly (menu and title bar are grayed out and input ignored).
[self performSelector:@selector(forceUnbundledWindowActivationHackStep1) withObject:nil afterDelay:0.02];
} |
Thanks, I just edited it to point to |
It should work, at least with non-Steam bundle arguments are passed correctly. |
Steam version activation issue seems to be fixed. Arguments are passed, but I'm not sure what it supposed to do. Is it for self-contained mode? It's not working on macOS in 3.x anyway, and I think we decided not to fix it last time it was discussed (fixed in 4.0 - #56762). |
The And |
Oh yeah this fixed it, thanks! |
Godot version
3.5.1
System information
macOS 13.0 Ventura
Issue description
Not sure if this is a steam issue or a godot issue, but it happens on two of my games on steam that I've tested. Can provide copies to testers if they need.
Basically if you open the game left click is unresponsive unless you click twice. The fix is to not move the mouse at all until the game menu fully loads. Notably the same bug is found in CSGO here: https://steamcommunity.com/discussions/forum/2/1752358461539279191/
Steps to reproduce
Open a godot-made game in steam from a macbook.
I can provide a key for one if needed
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: