From: Po Lu Date: Wed, 25 May 2022 00:49:14 +0000 (+0800) Subject: Fix compilation on GTK when Xrandr is not present X-Git-Tag: emacs-29.0.90~1910^2~446 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fcf80d7e62edb5a5ac0da346ac4d189671be2abf;p=emacs.git Fix compilation on GTK when Xrandr is not present * src/xterm.c (x_term_init): Make term always present on GTK. --- diff --git a/src/xterm.c b/src/xterm.c index 261fa807d0c..3fe81078819 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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) {