X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d16fb740912bf4874e7087f6f419427516047977..9bf31d1d3f35880c652f76509d1e27d33e454121:/src/xsettings.c diff --git a/src/xsettings.c b/src/xsettings.c index 028487b91e..d7af68f1c5 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -1,13 +1,13 @@ /* 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 @@ -537,10 +537,10 @@ parse_settings (unsigned char *prop, 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) {