From 85ec476a47f69cc712adce7c62cbb1dea621c5a9 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Sat, 16 Jun 2018 22:25:26 +0200 Subject: arctica-greeter-check-hidpi: Fix HiDPI auto-detection. 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 --- arctica-greeter-check-hidpi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arctica-greeter-check-hidpi') diff --git a/arctica-greeter-check-hidpi b/arctica-greeter-check-hidpi index 68f0baf..eaa01ca 100755 --- a/arctica-greeter-check-hidpi +++ b/arctica-greeter-check-hidpi @@ -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: -- cgit v1.2.3