mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-02 15:40:19 +00:00
removed redundant injection stop
This commit is contained in:
parent
07660bf8a3
commit
db0876373f
@ -58,10 +58,10 @@ if __name__ == '__main__':
|
||||
atexit.register(stop_injecting)
|
||||
|
||||
if getpass.getuser() != 'root' and 'unittest' not in sys.modules.keys():
|
||||
logger.error('Needs to run with sudo')
|
||||
logger.warn('Without sudo, your devices may not be visible')
|
||||
ErrorDialog(
|
||||
'Error',
|
||||
'Key Mapper needs administrator privileges to run properly.'
|
||||
'Warning',
|
||||
'Without sudo, your devices may not be visible'
|
||||
)
|
||||
|
||||
Gtk.main()
|
||||
|
@ -124,8 +124,6 @@ class Window:
|
||||
|
||||
def on_close(self, *_):
|
||||
"""Safely close the application."""
|
||||
if self.keycode_reader is not None:
|
||||
self.keycode_reader.stop_injecting()
|
||||
GLib.source_remove(self.timeout)
|
||||
Gtk.main_quit()
|
||||
|
||||
@ -262,7 +260,6 @@ class Window:
|
||||
f'Could not grab device "{self.selected_device}"'
|
||||
)
|
||||
|
||||
|
||||
def on_select_device(self, dropdown):
|
||||
"""List all presets, create one if none exist yet."""
|
||||
if dropdown.get_active_id() == self.selected_device:
|
||||
|
Loading…
Reference in New Issue
Block a user