Skip to content

Commit

Permalink
Merge pull request #848 from morinted/fix_839
Browse files Browse the repository at this point in the history
Quit engine when quitting QCoreApplication to prevent Mac freeze
  • Loading branch information
benoit-pierre committed Nov 19, 2017
2 parents 8886a7c + 8378530 commit 4d93ac9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plover/gui_qt/main.py
Expand Up @@ -49,6 +49,9 @@ def __init__(self, config, use_qt_notifications):
QApplication.setQuitOnLastWindowClosed(False)

self._app.engine = self._engine = Engine(config, KeyboardEmulation())
# On macOS, quitting through the dock will result
# in a direct call to `QCoreApplication.quit`.
self._app.aboutToQuit.connect(self._app.engine.quit)

signal.signal(signal.SIGINT, lambda signum, stack: self._engine.quit())

Expand Down

0 comments on commit 4d93ac9

Please sign in to comment.