aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBasil L. Contovounesios2021-02-14 16:58:06 +0000
committerBasil L. Contovounesios2021-02-16 16:46:53 +0000
commit1abf3ae854dbf8405e81680225517bbfac648964 (patch)
tree02c0021d3cb09a650f6609ddb23314c7fd1a8417 /src
parent76220fc3fc8b109d53676c1771fa1f05f3706ac7 (diff)
downloademacs-1abf3ae854dbf8405e81680225517bbfac648964.tar.gz
emacs-1abf3ae854dbf8405e81680225517bbfac648964.zip
Pacify unused function warning in xfns.c with GTK2
* src/xfns.c (x_get_net_workarea, x_get_monitor_for_frame) (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback): [HAVE_XINERAMA] (x_get_monitor_attributes_xinerama) [HAVE_XRANDR] (x_get_monitor_attributes_xrandr) (x_get_monitor_attributes): Fix #ifdefs around definitions to avoid unused function warnings regardless of GTK use (bug#46509). [HAVE_XRANDR] (x_get_monitor_attributes_xrandr): Undefine RANDR13_LIBRARY after it's been used.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 481ee0e2255..d90644819b6 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4599,7 +4599,7 @@ On MS Windows, this just returns nil. */)
4599 return Qnil; 4599 return Qnil;
4600} 4600}
4601 4601
4602#if !defined USE_GTK || !defined HAVE_GTK3 4602#if !(defined USE_GTK && defined HAVE_GTK3)
4603 4603
4604/* Store the geometry of the workarea on display DPYINFO into *RECT. 4604/* Store the geometry of the workarea on display DPYINFO into *RECT.
4605 Return false if and only if the workarea information cannot be 4605 Return false if and only if the workarea information cannot be
@@ -4662,6 +4662,9 @@ x_get_net_workarea (struct x_display_info *dpyinfo, XRectangle *rect)
4662 4662
4663 return result; 4663 return result;
4664} 4664}
4665#endif /* !(USE_GTK && HAVE_GTK3) */
4666
4667#ifndef USE_GTK
4665 4668
4666/* Return monitor number where F is "most" or closest to. */ 4669/* Return monitor number where F is "most" or closest to. */
4667static int 4670static int
@@ -4877,6 +4880,8 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo)
4877 pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window); 4880 pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window);
4878#endif 4881#endif
4879 4882
4883#undef RANDR13_LIBRARY
4884
4880 for (i = 0; i < n_monitors; ++i) 4885 for (i = 0; i < n_monitors; ++i)
4881 { 4886 {
4882 XRROutputInfo *info = XRRGetOutputInfo (dpy, resources, 4887 XRROutputInfo *info = XRRGetOutputInfo (dpy, resources,