]> code.delx.au - gnu-emacs/blobdiff - src/xsettings.c
Ibuffer change marks
[gnu-emacs] / src / xsettings.c
index 8dbc7d990febd26049a5780acc9c5bb0a4319c99..d7af68f1c5f58d712b7f4f421f318a2b705e5f47 100644 (file)
@@ -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)
             {
@@ -804,7 +804,7 @@ init_gsettings (void)
     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);
   }