emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1abf3ae: Pacify unused function warning in xfns.c with GTK2


From: Basil L. Contovounesios
Subject: master 1abf3ae: Pacify unused function warning in xfns.c with GTK2
Date: Tue, 16 Feb 2021 11:47:46 -0500 (EST)

branch: master
commit 1abf3ae854dbf8405e81680225517bbfac648964
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    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.
---
 src/xfns.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/xfns.c b/src/xfns.c
index 481ee0e..d906448 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4599,7 +4599,7 @@ On MS Windows, this just returns nil.  */)
     return Qnil;
 }
 
-#if !defined USE_GTK || !defined HAVE_GTK3
+#if !(defined USE_GTK && defined HAVE_GTK3)
 
 /* Store the geometry of the workarea on display DPYINFO into *RECT.
    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)
 
   return result;
 }
+#endif /* !(USE_GTK && HAVE_GTK3) */
+
+#ifndef USE_GTK
 
 /* Return monitor number where F is "most" or closest to.  */
 static int
@@ -4877,6 +4880,8 @@ x_get_monitor_attributes_xrandr (struct x_display_info 
*dpyinfo)
     pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window);
 #endif
 
+#undef RANDR13_LIBRARY
+
   for (i = 0; i < n_monitors; ++i)
     {
       XRROutputInfo *info = XRRGetOutputInfo (dpy, resources,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]