mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Code refactoring: replaced macro 'HAVE_XRANDR' by 'USE_XRANDR' for consistency
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.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
2a7a4d77d7
commit
73c00fac27
@@ -520,7 +520,7 @@ LIBXRANDR=
|
|||||||
if test "$xrandr" = yes; then
|
if test "$xrandr" = yes; then
|
||||||
AC_CHECK_LIB(Xrandr, XRRQueryExtension, [LIBXRANDR=-lXrandr
|
AC_CHECK_LIB(Xrandr, XRRQueryExtension, [LIBXRANDR=-lXrandr
|
||||||
added_xext=yes
|
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)
|
xrandr=no, $XLFLAGS $XLIBS)
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LIBXRANDR)
|
AC_SUBST(LIBXRANDR)
|
||||||
|
|||||||
@@ -600,7 +600,7 @@ extern struct wmaker_global_variables {
|
|||||||
} xkb;
|
} xkb;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
struct {
|
struct {
|
||||||
Bool supported;
|
Bool supported;
|
||||||
int event_base;
|
int event_base;
|
||||||
|
|||||||
@@ -1292,7 +1292,7 @@ void wShowInfoPanel(WScreen *scr)
|
|||||||
strbuf = wstrappend(strbuf, _("\nAdditional support for: "));
|
strbuf = wstrappend(strbuf, _("\nAdditional support for: "));
|
||||||
strbuf = wstrappend(strbuf, "WMSPEC");
|
strbuf = wstrappend(strbuf, "WMSPEC");
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
strbuf = wstrappend(strbuf, ", XRandR ");
|
strbuf = wstrappend(strbuf, ", XRandR ");
|
||||||
if (w_global.xext.randr.supported)
|
if (w_global.xext.randr.supported)
|
||||||
strbuf = wstrappend(strbuf, _("(Supported)"));
|
strbuf = wstrappend(strbuf, _("(Supported)"));
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#include "xdnd.h"
|
#include "xdnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
#include <X11/extensions/Xrandr.h>
|
#include <X11/extensions/Xrandr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ void DispatchEvent(XEvent * event)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
if (event->xconfigure.window == DefaultRootWindow(dpy))
|
if (event->xconfigure.window == DefaultRootWindow(dpy))
|
||||||
XRRUpdateConfiguration(event);
|
XRRUpdateConfiguration(event);
|
||||||
#endif
|
#endif
|
||||||
@@ -557,7 +557,7 @@ static void handleExtensions(XEvent * event)
|
|||||||
handleXkbIndicatorStateNotify(event);
|
handleXkbIndicatorStateNotify(event);
|
||||||
}
|
}
|
||||||
#endif /*KEEP_XKB_LOCK_STATUS */
|
#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)) {
|
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
|
/* From xrandr man page: "Clients must call back into Xlib using
|
||||||
* XRRUpdateConfiguration when screen configuration change notify
|
* XRRUpdateConfiguration when screen configuration change notify
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
#ifdef KEEP_XKB_LOCK_STATUS
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
#include <X11/extensions/Xrandr.h>
|
#include <X11/extensions/Xrandr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -540,7 +540,7 @@ WScreen *wScreenInit(int screen_number)
|
|||||||
}
|
}
|
||||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
if (w_global.xext.randr.supported)
|
if (w_global.xext.randr.supported)
|
||||||
XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
|
XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
#ifdef KEEP_XKB_LOCK_STATUS
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
#include <X11/extensions/Xrandr.h>
|
#include <X11/extensions/Xrandr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -592,7 +592,7 @@ void StartUp(Bool defaultScreenOnly)
|
|||||||
w_global.xext.shape.supported = XShapeQueryExtension(dpy, &w_global.xext.shape.event_base, &j);
|
w_global.xext.shape.supported = XShapeQueryExtension(dpy, &w_global.xext.shape.event_base, &j);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef USE_XRANDR
|
||||||
w_global.xext.randr.supported = XRRQueryExtension(dpy, &w_global.xext.randr.event_base, &j);
|
w_global.xext.randr.supported = XRRQueryExtension(dpy, &w_global.xext.randr.event_base, &j);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user