-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Don't restart the app #45
Comments
You mean the freeze on wake that happens in some cases, that forces the user to restart the app? |
I thought this was expected, this happens to me every single day. Is there a known way to fix this? |
This was not the case in previous versions of macOS. It seems to get progressively harder to restart the app on wake with each upgrade. There definitely are ways to fix this, since apps like BetterTouchTool somehow are able to do it. The easiest fix that helped me before is to increase the delay for restart on wake, but it's not a stable solution. |
I don't get why the app needs to be restarted at all. In the source code I see |
I guess you're right, we could do this without restarting the app. Replacing the contents of The only thing we need to do is cleanup the old listeners before that: otherwise, the middle click happens twice for one gesture after display reconfiguration or multitouch device addition. For recreating the listeners on wake from sleep it works fine without any tuning though, because the old listeners just die anyway (I wonder if we can make them persistent). |
Thank you for your quick response! I get it now. |
There is one more problem. If the listeners are restarted before the system fully wakes up, that is, starts the multitouch devices, then the listeners are going to be attached to old instances of multitouch controllers (the terminology might be inaccurate, but it describes the problem good enough), forcing the user to manually restart the app to make it work. This has been an issue for ages, and changing the method of restarting the app doesn't solve it. Restart the listeners early — the functionality dies, late — the user is forced to wait before being able to use the functionality. Just thought of a possible solution: |
It seems like I just uncovered (and, very likely, introduced) some memory leaks, but it works — the app does not need to restart itself, and restarts the listeners instead. |
I'm curious why do we need to restart the app? It seems like a hack. Could we get rid of it?
The text was updated successfully, but these errors were encountered: