gui, audio: ensure guivm and audiovm tag are set
This commit is contained in:
parent
795ff1233a
commit
8f67334c4f
@ -22,7 +22,14 @@ import qubes.ext
|
||||
|
||||
|
||||
class AUDIO(qubes.ext.Extension):
|
||||
# pylint: disable=too-few-public-methods
|
||||
# pylint: disable=unused-argument,no-self-use
|
||||
@qubes.ext.handler('domain-init', 'domain-load')
|
||||
def on_domain_init_load(self, vm, event):
|
||||
if getattr(vm, 'audiovm', None):
|
||||
if 'audiovm-' + vm.audiovm not in list(vm.tags):
|
||||
vm.fire_event('property-set:audiovm',
|
||||
name='audiovm', newvalue=vm.audiovm)
|
||||
|
||||
# property-del <=> property-reset-to-default
|
||||
@qubes.ext.handler('property-del:audiovm')
|
||||
def on_property_del(self, subject, event, name, oldvalue=None):
|
||||
|
@ -35,6 +35,14 @@ class GUI(qubes.ext.Extension):
|
||||
if vm.features.get('gui-seamless', False)
|
||||
else 'FULLSCREEN'))
|
||||
|
||||
# pylint: disable=unused-argument,no-self-use
|
||||
@qubes.ext.handler('domain-init', 'domain-load')
|
||||
def on_domain_init_load(self, vm, event):
|
||||
if getattr(vm, 'guivm', None):
|
||||
if 'guivm-' + vm.guivm not in list(vm.tags):
|
||||
vm.fire_event('property-set:guivm',
|
||||
name='guivm', newvalue=vm.guivm)
|
||||
|
||||
# property-del <=> property-reset-to-default
|
||||
@qubes.ext.handler('property-del:guivm')
|
||||
def on_property_del(self, subject, event, name, oldvalue=None):
|
||||
|
Loading…
Reference in New Issue
Block a user