gui: trigger services start for ps2 devices
This commit is contained in:
parent
1500ed8fcb
commit
480aeee9de
@ -21,6 +21,7 @@
|
|||||||
# License along with this library; if not, see <https://www.gnu.org/licenses/>.
|
# License along with this library; if not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import asyncio
|
||||||
import qubes.config
|
import qubes.config
|
||||||
import qubes.ext
|
import qubes.ext
|
||||||
import qubes.exc
|
import qubes.exc
|
||||||
@ -110,12 +111,16 @@ class GUI(qubes.ext.Extension):
|
|||||||
oldvalue=oldvalue)
|
oldvalue=oldvalue)
|
||||||
|
|
||||||
@qubes.ext.handler('domain-start')
|
@qubes.ext.handler('domain-start')
|
||||||
|
@asyncio.coroutine
|
||||||
def on_domain_start(self, vm, event, **kwargs):
|
def on_domain_start(self, vm, event, **kwargs):
|
||||||
attached_vms = [domain for domain in self.attached_vms(vm) if
|
attached_vms = [domain for domain in self.attached_vms(vm) if
|
||||||
domain.is_running()]
|
domain.is_running()]
|
||||||
for attached_vm in attached_vms:
|
for attached_vm in attached_vms:
|
||||||
attached_vm.untrusted_qdb.write('/qubes-gui-domain-xid',
|
attached_vm.untrusted_qdb.write('/qubes-gui-domain-xid',
|
||||||
str(vm.xid))
|
str(vm.xid))
|
||||||
|
if vm.features.get('input-proxy-ps2', None) == '1':
|
||||||
|
yield from asyncio.create_subprocess_exec(
|
||||||
|
'/usr/bin/qubes-input-trigger-ps2')
|
||||||
|
|
||||||
@qubes.ext.handler('property-reset:keyboard_layout')
|
@qubes.ext.handler('property-reset:keyboard_layout')
|
||||||
def on_keyboard_reset(self, vm, event, name, oldvalue=None):
|
def on_keyboard_reset(self, vm, event, name, oldvalue=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user