Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion qubeswhonix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def on_domain_add(self, app, _event, vm, **_kwargs):
'not exists', default_dispvm)
vm.default_dispvm = None

if 'gui-events-max-delay' not in vm.features:
vm.features['gui-events-max-delay'] = 100

@qubes.ext.handler('features-request')
def on_features_request(self, vm, _event, untrusted_features):
'''Handle whonix-ws/whonix-gw template advertising itself'''
Expand All @@ -89,10 +92,15 @@ def on_features_request(self, vm, _event, untrusted_features):

@qubes.ext.handler('domain-load')
def on_domain_load(self, vm, _event):
'''Retroactively add tags to sys-whonix and anon-whonix'''
'''Retroactively add tags to sys-whonix and anon-whonix. Also enable
event buffering if it's not already enabled.
'''
if hasattr(vm, 'template') and 'whonix-gw' in vm.template.features \
and 'anon-gateway' not in vm.tags:
vm.tags.add('anon-gateway')
if hasattr(vm, 'template') and 'whonix-ws' in vm.template.features \
and 'anon-vm' not in vm.tags:
vm.tags.add('anon-vm')
if hasattr(vm, 'template') and 'whonix-ws' in vm.template.features \
and 'gui-events-max-delay' not in vm.features:
vm.features['gui-events-max-delay'] = 100