1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 23:22:30 +01:00

Code refactoring: replaced macro 'SHAPE' by 'USE_XSHAPE' 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:
Christophe CURIS
2013-11-18 00:51:57 +01:00
committed by Carlos R. Mafra
parent 0d66173e1f
commit 6184c955e7
13 changed files with 36 additions and 36 deletions

View File

@@ -586,7 +586,7 @@ extern struct wmaker_global_variables {
/* X Extensions */
struct {
#ifdef SHAPE
#ifdef USE_XSHAPE
struct {
Bool supported;
int event_base;

View File

@@ -22,7 +22,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#ifdef SHAPE
#ifdef USE_XSHAPE
#include <X11/extensions/shape.h>
#endif
@@ -166,7 +166,7 @@ void wClientConfigure(WWindow * wwin, XConfigureRequestEvent * xcre)
XConfigureWindow(dpy, xcre->window, xcre->value_mask, &xwc);
return;
}
#ifdef SHAPE
#ifdef USE_XSHAPE
if (w_global.xext.shape.supported) {
int junk;
unsigned int ujunk;

View File

@@ -35,7 +35,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef SHAPE
#ifdef USE_XSHAPE
# include <X11/extensions/shape.h>
#endif
#ifdef XDND
@@ -103,7 +103,7 @@ static void handle_inotify_events(void);
static void wdelete_death_handler(WMagicNumber id);
#ifdef SHAPE
#ifdef USE_XSHAPE
static void handleShapeNotify(XEvent *event);
#endif
@@ -547,7 +547,7 @@ static void handleExtensions(XEvent * event)
XkbEvent *xkbevent;
xkbevent = (XkbEvent *) event;
#endif /*KEEP_XKB_LOCK_STATUS */
#ifdef SHAPE
#ifdef USE_XSHAPE
if (w_global.xext.shape.supported && event->type == (w_global.xext.shape.event_base + ShapeNotify)) {
handleShapeNotify(event);
}
@@ -1147,7 +1147,7 @@ static void handleLeaveNotify(XEvent * event)
}
}
#ifdef SHAPE
#ifdef USE_XSHAPE
static void handleShapeNotify(XEvent * event)
{
XShapeEvent *shev = (XShapeEvent *) event;
@@ -1183,7 +1183,7 @@ static void handleShapeNotify(XEvent * event)
wWindowSetShape(wwin);
}
}
#endif /* SHAPE */
#endif /* USE_XSHAPE */
#ifdef KEEP_XKB_LOCK_STATUS
/* please help ]d if you know what to do */

View File

@@ -38,7 +38,7 @@
#include <X11/cursorfont.h>
#include <X11/Xproto.h>
#include <X11/keysym.h>
#ifdef SHAPE
#ifdef USE_XSHAPE
#include <X11/extensions/shape.h>
#endif
#ifdef KEEP_XKB_LOCK_STATUS
@@ -587,7 +587,7 @@ void StartUp(Bool defaultScreenOnly)
XSetErrorHandler((XErrorHandler) catchXError);
#ifdef SHAPE
#ifdef USE_XSHAPE
/* ignore j */
w_global.xext.shape.supported = XShapeQueryExtension(dpy, &w_global.xext.shape.event_base, &j);
#endif

View File

@@ -36,7 +36,7 @@
#include "xinerama.h"
#ifdef SHAPE
#ifdef USE_XSHAPE
#include <X11/extensions/shape.h>
#endif
@@ -519,7 +519,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, Bool class_only)
XSetWindowBackgroundPixmap(dpy, WMWidgetXID(panel->win), pixmap);
#ifdef SHAPE
#ifdef USE_XSHAPE
if (mask && w_global.xext.shape.supported)
XShapeCombineMask(dpy, WMWidgetXID(panel->win), ShapeBounding, 0, 0, mask, ShapeSet);
#endif

View File

@@ -363,7 +363,7 @@
#endif
/* some rules */
#ifndef SHAPE
#ifndef USE_XSHAPE
#undef SHAPED_BALLOON
#endif

View File

@@ -23,7 +23,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef SHAPE
#ifdef USE_XSHAPE
#include <X11/extensions/shape.h>
#endif
#ifdef KEEP_XKB_LOCK_STATUS
@@ -614,7 +614,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
XSaveContext(dpy, window, w_global.context.client_win, (XPointer) & wwin->client_descriptor);
#ifdef SHAPE
#ifdef USE_XSHAPE
if (w_global.xext.shape.supported) {
int junk;
unsigned int ujunk;
@@ -2039,7 +2039,7 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re
wwin->client.x += wwin->screen_ptr->frame_border_width;
wwin->client.y += wwin->screen_ptr->frame_border_width;
}
#ifdef SHAPE
#ifdef USE_XSHAPE
if (w_global.xext.shape.supported && wwin->flags.shaped && resize)
wWindowSetShape(wwin);
#endif
@@ -2263,7 +2263,7 @@ void wWindowConfigureBorders(WWindow *wwin)
if (flags != 0)
wFrameWindowHideButton(wwin->frame, flags);
#ifdef SHAPE
#ifdef USE_XSHAPE
if (w_global.xext.shape.supported && wwin->flags.shaped)
wWindowSetShape(wwin);
#endif
@@ -2338,7 +2338,7 @@ static int getSavedState(Window window, WSavedState ** state)
return 0;
}
#ifdef SHAPE
#ifdef USE_XSHAPE
void wWindowClearShape(WWindow * wwin)
{
XShapeCombineMask(dpy, wwin->frame->core->window, ShapeBounding,
@@ -2422,7 +2422,7 @@ void wWindowSetShape(WWindow * wwin)
ShapeBounding, (count > 0 ? ShapeUnion : ShapeSet));
XFlush(dpy);
}
#endif /* SHAPE */
#endif /* USE_XSHAPE */
/* ====================================================================== */

View File

@@ -256,7 +256,7 @@ typedef struct WWindow {
unsigned int semi_focused:1;
/* window type flags */
unsigned int urgent:1; /* if wm_hints says this is urgent */
#ifdef SHAPE
#ifdef USE_XSHAPE
unsigned int shaped:1;
#endif
@@ -330,7 +330,7 @@ typedef void* WMagicNumber;
void wWindowDestroy(WWindow *wwin);
WWindow *wWindowCreate(void);
#ifdef SHAPE
#ifdef USE_XSHAPE
void wWindowSetShape(WWindow *wwin);
void wWindowClearShape(WWindow *wwin);
#endif

View File

@@ -22,7 +22,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef SHAPE
#ifdef USE_XSHAPE
#include <X11/extensions/shape.h>
#endif
@@ -370,7 +370,7 @@ static void showWorkspaceName(WScreen * scr, int workspace)
WMDrawString(scr->wmscreen, text, scr->white, w_global.workspace.font_for_name, 2, 2, name, len);
#ifdef SHAPE
#ifdef USE_XSHAPE
if (w_global.xext.shape.supported)
XShapeCombineMask(dpy, scr->workspace_name, ShapeBounding, 0, 0, mask, ShapeSet);
#endif