/* Functions for handling font and other changes dynamically.
-Copyright (C) 2009-2015 Free Software Foundation, Inc.
+Copyright (C) 2009-2016 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
else
settings->seen &= ~SEEN_RGBA;
}
- else if (strcmp (name, "Xft/DPI") == 0)
+ else if (strcmp (name, "Xft/DPI") == 0 && ival != (CARD32) -1)
{
settings->seen |= SEEN_DPI;
- settings->dpi = (double)ival/1024.0;
+ settings->dpi = ival / 1024.0;
}
else if (strcmp (name, "Xft/lcdfilter") == 0)
{
GSettingsSchema *sc = g_settings_schema_source_lookup
(g_settings_schema_source_get_default (),
GSETTINGS_SCHEMA,
- TRUE);
+ true);
schema_found = sc != NULL;
if (sc) g_settings_schema_unref (sc);
}