mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Allow Drivers to handle key events after being restarted (#1150)
This commit is contained in:
@@ -176,6 +176,7 @@ class LinuxDriver(Driver):
|
||||
self.exit_event.set()
|
||||
if self._key_thread is not None:
|
||||
self._key_thread.join()
|
||||
self.exit_event.clear()
|
||||
termios.tcflush(self.fileno, termios.TCIFLUSH)
|
||||
except Exception as error:
|
||||
# TODO: log this
|
||||
|
||||
@@ -84,6 +84,7 @@ class WindowsDriver(Driver):
|
||||
if self._event_thread is not None:
|
||||
self._event_thread.join()
|
||||
self._event_thread = None
|
||||
self.exit_event.clear()
|
||||
except Exception as error:
|
||||
# TODO: log this
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user