Browse Source

Merge remote-tracking branch 'origin/pr/367'

* origin/pr/367:
  gui: add --all and --dom0 to qubes-input-trigger script
  gui: adapt trigger for dom0 input devices
  gui: trigger services start for ps2 devices
Marek Marczykowski-Górecki 4 years ago
parent
commit
bdd1184a3a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      qubes/ext/gui.py

+ 5 - 0
qubes/ext/gui.py

@@ -21,6 +21,7 @@
 # License along with this library; if not, see <https://www.gnu.org/licenses/>.
 #
 
+import asyncio
 import qubes.config
 import qubes.ext
 import qubes.exc
@@ -110,12 +111,16 @@ class GUI(qubes.ext.Extension):
                               oldvalue=oldvalue)
 
     @qubes.ext.handler('domain-start')
+    @asyncio.coroutine
     def on_domain_start(self, vm, event, **kwargs):
         attached_vms = [domain for domain in self.attached_vms(vm) if
                         domain.is_running()]
         for attached_vm in attached_vms:
             attached_vm.untrusted_qdb.write('/qubes-gui-domain-xid',
                                             str(vm.xid))
+        if vm.features.get('input-dom0-proxy', None):
+            yield from asyncio.create_subprocess_exec(
+                '/usr/bin/qubes-input-trigger --all --dom0')
 
     @qubes.ext.handler('property-reset:keyboard_layout')
     def on_keyboard_reset(self, vm, event, name, oldvalue=None):