Closed patricknelson closed 2 years ago
Just setting the v2.2 milestone since the Exit
capability currently in master
is broken, so ideally either this or #7 should be merged prior to the next release.
Closing this in lieu of the approach taken in #7.
I noticed that
MouseUnsnag.exe
didn't actually close when clicking theExit
option in the system tray icon menu. I'm not 100% sure what I'm doing here since I don't typically build windows GUI apps, so my initial fix was to just swap outApplication.Exit()
withEnvironment.Exit(0)
which probably just unceremoniously kills the application.My guess (being a noob in C#) is that
Application.Exit()
should have allowed the process to exit gracefully on its own, but since maybe it's hooking into something (maybe viaMouseHookHandler
), it stays running until those handlers are closed, maybe? Not sure. I'm guessing this fix works since it's probably taking a sledge hammer to everything. But again... I'm dumb and I don't really know for sure yet 😬cc @drewnoakes since you were the original author of this option here (back in 2018). Do you know if issue existed back then in your version as well?EDIT: Never mind, I just found that this was caused by some odd undocumented functionality associated with a separate thread being created to watch the caps lock key, will address in #6 and in a separate PR.