]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix compilation on GTK when Xrandr is not present
authorPo Lu <luangruo@yahoo.com>
Wed, 25 May 2022 00:49:14 +0000 (08:49 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 25 May 2022 00:53:31 +0000 (08:53 +0800)
* src/xterm.c (x_term_init): Make term always present on GTK.

src/xterm.c

index 261fa807d0cd68962340d3a024073d30f73d9d39..3fe810788199b0bf163ad5048d9d0a18f0002448 100644 (file)
@@ -24679,17 +24679,20 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   ;
 #endif
 
-#ifdef HAVE_XRANDR
+#if defined HAVE_XRANDR || defined USE_GTK
   Lisp_Object term;
 
-#ifndef USE_GTK
-  dpyinfo->last_monitor_attributes_list = Qnil;
+  XSETTERMINAL (term, terminal);
 #endif
+
+#ifdef HAVE_XRANDR
   dpyinfo->xrandr_supported_p
     = XRRQueryExtension (dpy, &dpyinfo->xrandr_event_base,
                         &dpyinfo->xrandr_error_base);
 
-  XSETTERMINAL (term, terminal);
+#ifndef USE_GTK
+  dpyinfo->last_monitor_attributes_list = Qnil;
+#endif
 
   if (dpyinfo->xrandr_supported_p)
     {