]> git.eshelyaron.com Git - emacs.git/commitdiff
Do not assume Xrender merely because Cairo
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Jan 2021 18:33:43 +0000 (10:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Jan 2021 18:35:19 +0000 (10:35 -0800)
Problem reported by Andrea Corallo in:
https://lists.gnu.org/r/emacs-devel/2021-01/msg00225.html
* src/xterm.c (x_term_init) [USE_CAIRO && !HAVE_XRENDER]:
Do not call XRenderQueryExtension.

src/xterm.c

index 0a86738cc2094c37c69ae94140d8c820c168a96d..b8374fed8b1ba2b2f0115b05181db013f0cf2f94 100644 (file)
@@ -13035,13 +13035,13 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
        or larger than other for other applications, even if it is the same
        font name (monospace-10 for example).  */
 
+# ifdef HAVE_XRENDER
     int event_base, error_base;
-    char *v;
-    double d;
-
     XRenderQueryExtension (dpyinfo->display, &event_base, &error_base);
+# endif
 
-    v = XGetDefault (dpyinfo->display, "Xft", "dpi");
+    char *v = XGetDefault (dpyinfo->display, "Xft", "dpi");
+    double d;
     if (v != NULL && sscanf (v, "%lf", &d) == 1)
       dpyinfo->resy = dpyinfo->resx = d;
   }