Skip to content

Commit

Permalink
arctica-greeter-check-hidpi: Fix HiDPI auto-detection.
Browse files Browse the repository at this point in the history
 When calculating the rectangle height, using `get_monitor_geometry`
 returns "application pixels", rather than "device pixels". We need to
 multiply by the scale factor to convert to the correct value.

 https://valadoc.org/gdk-3.0/Gdk.Screen.get_monitor_geometry.html

 Ported from slick-greeter by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
  • Loading branch information
vkareh authored and sunweaver committed Jun 16, 2018
1 parent cc72215 commit 85ec476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arctica-greeter-check-hidpi
Expand Up @@ -44,7 +44,7 @@ def get_window_scale():
or (width_mm == 16 and height_mm == 10)):
return 1

if rect.height < 1500:
if rect.height * monitor_scale < 1500:
return 1

if width_mm > 0 and height_mm > 0:
Expand Down

0 comments on commit 85ec476

Please sign in to comment.