-
Notifications
You must be signed in to change notification settings - Fork 280
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
Fix 1279 #1284
Fix 1279 #1284
Conversation
Note.
|
Only from the same machine: Unix socket on Linux/macOS, and named pipe on Windows. |
Note: what happens if Plover is not properly exited and the file On the other hand the old lock thing might have the same issue. |
In case of hard crash (segfault, abort), it's possible that the socket won't be properly deleted.
Not on Windows, since it was using an OS primitive. |
It is possible to do something similar to vim -- include the PID information somewhere, and if the PID is dead assume that the socket is left after a crash (and just force delete it). Although there must be some library for that already...? |
Changed to something simpler: if we can't connect to send the |
OK, I think this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. On Mac, when Plover is in system tray, the focus puts Plover in focus (menu bar updates) but no main window appears. This is consistent with how quicktime works so I think it's okay.
Not used anymore, and support was dropped in setuptools>=52.0.0.
Remove the process lock, switch to a custom controller object for both ensuring that only one instance of Plover is running, and sending commands to that instance. Reuse the focus command to restore and focus the main window when attempting to launch a second time.
Summary of changes
Remove the process lock, switch to a custom controller object for both ensuring that only one instance of Plover is running, and sending commands to that instance. Reuse the
focus
command to restore and focus the main window when attempting to launch a second time.Closes #1279.
Pull Request Checklist