aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <vkareh@vkareh.net>2018-06-16 22:25:26 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-06-16 22:25:29 +0200
commit85ec476a47f69cc712adce7c62cbb1dea621c5a9 (patch)
tree000a413a4ff732983d28f3310709d0a6d41a3fd4
parentcc72215a1df7762ddc773f65d7666c13a0d15993 (diff)
downloadarctica-greeter-85ec476a47f69cc712adce7c62cbb1dea621c5a9.tar.gz
arctica-greeter-85ec476a47f69cc712adce7c62cbb1dea621c5a9.tar.bz2
arctica-greeter-85ec476a47f69cc712adce7c62cbb1dea621c5a9.zip
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 <mike.gabriel@das-netzwerkteam.de>
-rwxr-xr-xarctica-greeter-check-hidpi2
1 files changed, 1 insertions, 1 deletions
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: