settings: Read xft-dpi from slick-greeter.conf as a double - #293
Open
ogzhntutucu wants to merge 1 commit into
Open
ogzhntutucu wants to merge 1 commit into
ogzhntutucu wants to merge 1 commit into
Conversation
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xft-dpiis a double (d) in the gsettings schema, butapply_conf_settings()handled it as an integer key, so it can't be set from/etc/lightdm/slick-greeter.confat all:xft-dpi=115→CRITICAL: g_settings_set_value: key 'xft-dpi' in 'x.dm.slick-greeter' expects type 'd', but a GVariant of type 'i' was givenxft-dpi=115.0→WARNING: Failed to apply xft-dpi from configuration file: Key file contains key "xft-dpi" in group "Greeter" which has a value that cannot be interpreted.This moves
xft-dpito a list of double keys read withget_double()/set_double().cursor-theme-sizestays an integer key.Testing (2.2.7 vs. this branch,
--test-modeunder Xvfb with a testslick-greeter.conf):115,115.0,96and144are now applied; an invalid value still logs the warning above.Screenshot:

xft-dpi=144, left 2.2.7, right this branch.Tested on Linux Mint 22.3.
🤖 Generated with Claude Code