Skip to content

Commit b106377

Browse files
committed
Update qubesdb first on keyboard layout change
It is better to update `keyboard-layout` of GUIVM in qubesdb before propagating the layout change to its child qubes. While this does not fix the original layout change propagation bug (there is another PR for that). It is still more logical related: QubesOS/qubes-issues#8441 related: QubesOS/qubes-issues#6517
1 parent fce8bad commit b106377

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

qubes/ext/gui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ def on_keyboard_reset(self, vm, event, name, oldvalue=None):
159159

160160
@qubes.ext.handler("property-set:keyboard_layout")
161161
def on_keyboard_set(self, vm, event, name, newvalue, oldvalue=None):
162+
if vm.is_running():
163+
vm.untrusted_qdb.write("/keyboard-layout", newvalue)
164+
162165
for domain in vm.app.domains:
163166
if getattr(
164167
domain, "guivm", None
@@ -169,9 +172,6 @@ def on_keyboard_set(self, vm, event, name, newvalue, oldvalue=None):
169172
oldvalue=oldvalue,
170173
)
171174

172-
if vm.is_running():
173-
vm.untrusted_qdb.write("/keyboard-layout", newvalue)
174-
175175
@qubes.ext.handler("domain-tag-add:created-by-*")
176176
def set_guivm_on_created_by(self, vm, event, tag, **kwargs):
177177
"""Set GuiVM based on 'tag-created-vm-with' and 'set-created-guivm'

0 commit comments

Comments
 (0)