@@ -73,6 +76,18 @@ def __init__(self, data):
self._pwq_error = None
self.passphrase = ""
+ # due to the contraints of the keymap at boot time, do not allow input
+ # from non-ASCII keymaps. This check depends on the current active keymap
+ # and not any particular input, but add it as an input check so that the error
+ # message is displayed through the same mechanism. Use add_check from
InputCheckHandler
+ # so that no real input object is needed and so there is no delay wrapper around
the check
+ self._keymap_check = InputCheckHandler.add_check(self, None, self._checkKeymap)
+
+ # Run the keymap check on keymap changes
+ self._xkl_instance = XklWrapper.get_instance()
+ self._xkl_instance.engine.connect("X-state-changed",
self.on_keymap_change)
+ self._xkl_instance.engine.connect("X-config-changed",
self.on_keymap_change)
The handler needs to be disconnected from both these signals somewhere because the
XklEngine is a per-process instance that exists for the whole process' lifetime and
thus it would run these handlers even if the dialog is destroyed etc.
--
To view this pull request on github, visit
https://github.com/rhinstaller/anaconda/pull/338#discussion_r38394990