Skip to content

Commit ff71bc2

Browse files
committed
Report XRandR display size for lodpi displays
fixes: QubesOS/qubes-issues#9578
1 parent 32e977b commit ff71bc2

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

qubesadmin/tests/tools/qvm_start_daemon.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def test_050_get_monitor_layout1(self, proc_mock):
493493
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
494494
'''.splitlines()
495495
self.assertEqual(qubesadmin.tools.qvm_start_daemon.get_monitor_layout(),
496-
['1920 1200 0 0\n'])
496+
['1920 1200 0 0 508 317\n'])
497497

498498
@unittest.mock.patch('subprocess.Popen')
499499
def test_051_get_monitor_layout_multiple(self, proc_mock):

qubesadmin/tools/qvm_start_daemon.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,12 @@ def get_monitor_layout():
416416
elif dpi > 150:
417417
dpi = 150
418418
else:
419-
# if lower, don't provide this info to the VM at all
420-
dpi = 0
421-
if dpi:
422-
# now calculate dimensions based on approximate DPI
423-
phys_size = " {} {}".format(
424-
int(output_params['width']) * 254 // dpi // 10,
425-
int(output_params['height']) * 254 // dpi // 10,
426-
)
419+
dpi = 96
420+
# now calculate dimensions based on approximate DPI
421+
phys_size = " {} {}".format(
422+
int(output_params['width']) * 254 // dpi // 10,
423+
int(output_params['height']) * 254 // dpi // 10,
424+
)
427425
outputs.append("%s %s %s %s%s\n" % (
428426
output_params['width'],
429427
output_params['height'],

0 commit comments

Comments
 (0)