Fixed property-reset event not firing for default_dispvm global property
fixes QubesOS/qubes-issues#5977
This commit is contained in:
parent
784878f1f7
commit
f35a7a78b3
12
qubes/app.py
12
qubes/app.py
@ -1546,3 +1546,15 @@ class Qubes(qubes.PropertyHolder):
|
|||||||
# netvm to it's default value
|
# netvm to it's default value
|
||||||
vm.fire_event('property-reset:netvm',
|
vm.fire_event('property-reset:netvm',
|
||||||
name='netvm', oldvalue=oldvalue)
|
name='netvm', oldvalue=oldvalue)
|
||||||
|
|
||||||
|
@qubes.events.handler('property-set:default_dispvm')
|
||||||
|
def on_property_set_default_dispvm(self, event, name, newvalue,
|
||||||
|
oldvalue=None):
|
||||||
|
# pylint: disable=unused-argument
|
||||||
|
for vm in self.domains:
|
||||||
|
if hasattr(vm, 'default_dispvm') and \
|
||||||
|
vm.property_is_default('default_dispvm'):
|
||||||
|
# fire property-reset:default_dispvm as it is responsible for
|
||||||
|
# resetting dispvm to it's default value
|
||||||
|
vm.fire_event('property-reset:default_dispvm',
|
||||||
|
name='default_dispvm', oldvalue=oldvalue)
|
||||||
|
Loading…
Reference in New Issue
Block a user