From 70d1b28a87d8f79fb8c6fcbe008851bc187b4f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20Tutucu?= Date: Sun, 4 Oct 2026 15:59:16 +0300 Subject: [PATCH] settings: Read xft-dpi from slick-greeter.conf as a double xft-dpi is a double ('d') in the gsettings schema, but apply_conf_settings() treated it as an integer key. As a result it could never be set from /etc/lightdm/slick-greeter.conf: - "xft-dpi=115" was read with get_integer() and passed to set_int(), which fails with "key 'xft-dpi' in 'x.dm.slick-greeter' expects type 'd', but a GVariant of type 'i' was given". - "xft-dpi=115.0" made get_integer() fail with "Key file contains key 'xft-dpi' in group 'Greeter' which has a value that cannot be interpreted". Move xft-dpi to a new list of double keys that uses get_double() and set_double(). Both "115" and "115.0" are now applied. Co-Authored-By: Claude Opus 5.5 --- src/settings.vala | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/settings.vala b/src/settings.vala index ab8a838..000dd61 100644 --- a/src/settings.vala +++ b/src/settings.vala @@ -154,9 +154,11 @@ public class UGSettings bool_keys.append (KEY_ACTIVATE_NUMLOCK); var int_keys = new List (); - int_keys.append (KEY_XFT_DPI); int_keys.append (KEY_CURSOR_THEME_SIZE); + var double_keys = new List (); + double_keys.append (KEY_XFT_DPI); + var strv_keys = new List (); strv_keys.append (KEY_HIDDEN_USERS); strv_keys.append (KEY_GROUP_FILTER); @@ -215,6 +217,24 @@ public class UGSettings } } + foreach (string key in double_keys) + { + if (keyfile.has_group (GROUP_NAME) && keyfile.has_key (GROUP_NAME, key)) { + try { + var value = keyfile.get_double (GROUP_NAME, key); + debug ("Overriding dconf setting for %s with %f", key, value); + gsettings.set_double (key, value); + } + catch (Error e) { + warning ("Failed to apply %s from configuration file: %s", key, e.message); + } + } + else { + gsettings.reset(key); + debug ("Resetting dconf setting for %s to default", key); + } + } + foreach (string key in strv_keys) { if (keyfile.has_group (GROUP_NAME) && keyfile.has_key (GROUP_NAME, key)) {