From: Christophe CURIS <christophe.cu...@free.fr>

The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 configure.ac      | 2 +-
 src/WindowMaker.h | 2 +-
 src/dialog.c      | 2 +-
 src/event.c       | 6 +++---
 src/screen.c      | 4 ++--
 src/startup.c     | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index e5fad66..4f9cf6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -520,7 +520,7 @@ LIBXRANDR=
 if test "$xrandr" = yes; then
        AC_CHECK_LIB(Xrandr, XRRQueryExtension, [LIBXRANDR=-lXrandr
                added_xext=yes
-               AC_DEFINE(HAVE_XRANDR, 1, [define if you want support for 
XRandR (set by configure)])],
+               AC_DEFINE(USE_XRANDR, 1, [define if you want support for XRandR 
(set by configure)])],
                xrandr=no, $XLFLAGS $XLIBS)
 fi
 AC_SUBST(LIBXRANDR)
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 0fb67e3..f11dab6 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -600,7 +600,7 @@ extern struct wmaker_global_variables {
                } xkb;
 #endif
 
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
                struct {
                        Bool supported;
                        int event_base;
diff --git a/src/dialog.c b/src/dialog.c
index 63b8c50..43f12fc 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -1292,7 +1292,7 @@ void wShowInfoPanel(WScreen *scr)
        strbuf = wstrappend(strbuf, _("\nAdditional support for: "));
        strbuf = wstrappend(strbuf, "WMSPEC");
 
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
        strbuf = wstrappend(strbuf, ", XRandR ");
        if (w_global.xext.randr.supported)
                strbuf = wstrappend(strbuf, _("(Supported)"));
diff --git a/src/event.c b/src/event.c
index da75cf3..acb7e1f 100644
--- a/src/event.c
+++ b/src/event.c
@@ -42,7 +42,7 @@
 #include "xdnd.h"
 #endif
 
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
 #include <X11/extensions/Xrandr.h>
 #endif
 
@@ -265,7 +265,7 @@ void DispatchEvent(XEvent * event)
                break;
 
        case ConfigureNotify:
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
                if (event->xconfigure.window == DefaultRootWindow(dpy))
                        XRRUpdateConfiguration(event);
 #endif
@@ -557,7 +557,7 @@ static void handleExtensions(XEvent * event)
                handleXkbIndicatorStateNotify(event);
        }
 #endif                         /*KEEP_XKB_LOCK_STATUS */
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
        if (w_global.xext.randr.supported && event->type == 
(w_global.xext.randr.event_base + RRScreenChangeNotify)) {
                /* From xrandr man page: "Clients must call back into Xlib using
                 * XRRUpdateConfiguration when screen configuration change 
notify
diff --git a/src/screen.c b/src/screen.c
index 52c164a..3735fc0 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -31,7 +31,7 @@
 #ifdef KEEP_XKB_LOCK_STATUS
 #include <X11/XKBlib.h>
 #endif                         /* KEEP_XKB_LOCK_STATUS */
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
 #include <X11/extensions/Xrandr.h>
 #endif
 
@@ -540,7 +540,7 @@ WScreen *wScreenInit(int screen_number)
        }
 #endif                         /* KEEP_XKB_LOCK_STATUS */
 
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
        if (w_global.xext.randr.supported)
                XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
 #endif
diff --git a/src/startup.c b/src/startup.c
index 581b644..6ede6f5 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -44,7 +44,7 @@
 #ifdef KEEP_XKB_LOCK_STATUS
 #include <X11/XKBlib.h>
 #endif
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
 #include <X11/extensions/Xrandr.h>
 #endif
 
@@ -592,7 +592,7 @@ void StartUp(Bool defaultScreenOnly)
        w_global.xext.shape.supported = XShapeQueryExtension(dpy, 
&w_global.xext.shape.event_base, &j);
 #endif
 
-#ifdef HAVE_XRANDR
+#ifdef USE_XRANDR
        w_global.xext.randr.supported = XRRQueryExtension(dpy, 
&w_global.xext.randr.event_base, &j);
 #endif
 
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to