Make per_monitor_dpi take precedence over Xft.dpi
If the per-monitor dpi feature has been enabled it shouldn't be overridden just because an Xft.dpi value is set, it's possibly for other programs that don't have such a feature.
This commit is contained in:
parent
c547f6eec9
commit
842a35db06
5
dunstrc
5
dunstrc
@ -208,7 +208,10 @@
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# Please note that this setting will not work if Xft.dpi X resource is set.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
[shortcuts]
|
||||
|
@ -239,9 +239,10 @@ sc_cleanup:
|
||||
double get_dpi_for_screen(screen_info *scr)
|
||||
{
|
||||
double dpi = 0;
|
||||
if ((dpi = get_xft_dpi_value()))
|
||||
if ((!settings.force_xinerama && settings.per_monitor_dpi &&
|
||||
(dpi = autodetect_dpi(scr))))
|
||||
return dpi;
|
||||
else if (settings.per_monitor_dpi && (dpi = autodetect_dpi(scr)))
|
||||
else if ((dpi = get_xft_dpi_value()))
|
||||
return dpi;
|
||||
else
|
||||
return 96;
|
||||
|
Loading…
x
Reference in New Issue
Block a user