From 76f2e65a6e011cb41f1b7897255c0cf23e49a30e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 16 Mar 2018 14:16:14 +0100 Subject: HiDPI: Do not enable it in test-mode. --- src/arctica-greeter.vala | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 74be36a..c10f883 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -648,17 +648,9 @@ public class ArcticaGreeter log_timer = new Timer (); Log.set_default_handler (log_cb); - var hidpi = AGSettings.get_string (AGSettings.KEY_ENABLE_HIDPI); - debug ("HiDPI support: %s", hidpi); - if (hidpi == "auto") { - check_hidpi (); - } - else if (hidpi == "on") { - GLib.Environment.set_variable ("GDK_SCALE", "2", true); - } - bool do_show_version = false; bool do_test_mode = false; + OptionEntry versionOption = { "version", 'v', 0, OptionArg.NONE, ref do_show_version, /* Help string for command line --version flag */ N_("Show release version"), null }; @@ -668,6 +660,18 @@ public class ArcticaGreeter OptionEntry nullOption = { null }; OptionEntry[] options = { versionOption, testOption, nullOption }; + if (!do_test_mode) + { + var hidpi = AGSettings.get_string (AGSettings.KEY_ENABLE_HIDPI); + debug ("HiDPI support: %s", hidpi); + if (hidpi == "auto") { + check_hidpi (); + } + else if (hidpi == "on") { + GLib.Environment.set_variable ("GDK_SCALE", "2", true); + } + } + debug ("Loading command line options"); var c = new OptionContext (/* Arguments and description for --help text */ _("- Arctica Greeter")); -- cgit v1.2.3