1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-11 03:05:52 +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

@@ -4,7 +4,7 @@
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#ifdef SHAPE
#ifdef USE_XSHAPE
#include <X11/extensions/shape.h>
#endif
@@ -202,7 +202,7 @@ static Window makeDragIcon(WMScreen * scr, WMPixmap * pixmap)
window = XCreateWindow(scr->display, scr->rootWin, 0, 0, size.width,
size.height, 0, scr->depth, InputOutput, scr->visual, flags, &attribs);
#ifdef SHAPE
#ifdef USE_XSHAPE
if (pixmap->mask) {
XShapeCombineMask(scr->display, window, ShapeBounding, 0, 0, pixmap->mask, ShapeSet);
}

View File

@@ -2,7 +2,7 @@
#include "wconfig.h"
#include "WINGsP.h"
#ifdef SHAPE
#ifdef USE_XSHAPE
#include <X11/extensions/shape.h>
#endif
@@ -438,7 +438,7 @@ static void showText(Balloon * bPtr, int x, int y, int w, int h, const char *tex
XFreePixmap(dpy, pixmap);
#ifdef SHAPE
#ifdef USE_XSHAPE
XShapeCombineMask(dpy, bPtr->view->window, ShapeBounding, 0, 0, mask, ShapeSet);
#endif
XFreePixmap(dpy, mask);

View File

@@ -43,7 +43,7 @@
/* BUG There's something fishy with shaped windows */
/* Whithout shape extension the magnified image is completely broken -Dan */
#ifdef SHAPE
#ifdef USE_XSHAPE
# include <X11/extensions/shape.h>
#endif
@@ -1510,7 +1510,7 @@ static Pixmap magnifyCreatePixmap(WMColorPanel * panel)
{
W_Screen *scr = WMWidgetScreen(panel->win);
int u, v;
#ifndef SHAPE
#ifndef USE_XSHAPE
Pixmap pixmap;
#endif
unsigned long color;
@@ -1547,7 +1547,7 @@ static Pixmap magnifyCreatePixmap(WMColorPanel * panel)
}
}
#ifdef SHAPE
#ifdef USE_XSHAPE
return panel->magnifyGlass->magPix;
#else
pixmap = XCreatePixmap(scr->display, W_DRAWABLE(scr), Cursor_mask_width, Cursor_mask_height, scr->depth);
@@ -1639,7 +1639,7 @@ static WMPoint magnifyInitialize(W_ColorPanel * panel)
panel->magnifyGlass->image = NULL;
/* Clipmask to make magnified view-contents circular */
#ifdef SHAPE
#ifdef USE_XSHAPE
XShapeCombineMask(scr->display, WMViewXID(panel->magnifyGlass->view),
ShapeBounding, 0, 0, clip_mask, ShapeSet);
#else
@@ -1658,7 +1658,7 @@ static WMPoint magnifyInitialize(W_ColorPanel * panel)
XClearWindow(scr->display, WMViewXID(panel->magnifyGlass->view));
XFlush(scr->display);
#ifndef SHAPE
#ifndef USE_XSHAPE
XFreePixmap(scr->display, pixmap);
#endif
@@ -1778,7 +1778,7 @@ static void magnifyPutCursor(WMWidget * w, void *data)
XClearWindow(scr->display, WMViewXID(panel->magnifyGlass->view));
/* Synchronize the event queue, so the Expose is handled NOW */
XFlush(scr->display);
#ifndef SHAPE
#ifndef USE_XSHAPE
XFreePixmap(scr->display, pixmap);
#endif
}