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> --- src/actions.c | 28 ++++++++++++++-------------- src/misc.c | 2 +- src/wconfig.h.in | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/actions.c b/src/actions.c index 1d46b03..d69f900 100644 --- a/src/actions.c +++ b/src/actions.c @@ -82,7 +82,7 @@ static int compareTimes(Time t1, Time t2) return (diff < 60000) ? 1 : -1; } -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS static void shade_animate(WWindow *wwin, Bool what); #else static inline void shade_animate(WWindow *wwin, Bool what) @@ -254,7 +254,7 @@ void wShadeWindow(WWindow *wwin) WMPostNotificationName(WMNChangedState, wwin, "shade"); -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (!wwin->screen_ptr->flags.startup) { /* Catch up with events not processed while animation was running */ ProcessPendingEvents(); @@ -763,7 +763,7 @@ void wUnfullscreenWindow(WWindow *wwin) } } -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS static void animateResizeFlip(WScreen *scr, int x, int y, int w, int h, int fx, int fy, int fw, int fh, int steps) { #define FRAMES (MINIATURIZE_ANIMATION_FRAMES_F) @@ -974,7 +974,7 @@ void animateResize(WScreen *scr, int x, int y, int w, int h, int fx, int fy, int break; } } -#endif /* ANIMATIONS */ +#endif /* USE_ANIMATIONS */ static void flushExpose(void) { @@ -1174,7 +1174,7 @@ void wIconifyWindow(WWindow *wwin) unmapTransientsFor(wwin); if (present) { -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS int ix, iy, iw, ih; #endif XUngrabPointer(dpy, CurrentTime); @@ -1189,7 +1189,7 @@ void wIconifyWindow(WWindow *wwin) wClientSetState(wwin, IconicState, wwin->icon->icon_win); flushExpose(); -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih)) animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y, wwin->frame->core->width, wwin->frame->core->height, ix, iy, iw, ih); @@ -1231,7 +1231,7 @@ void wIconifyWindow(WWindow *wwin) } else if (wPreferences.focus_mode != WKF_CLICK) { wSetFocusTo(wwin->screen_ptr, NULL); } -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (!wwin->screen_ptr->flags.startup) { /* Catch up with events not processed while animation was running */ Window clientwin = wwin->client_win; @@ -1307,7 +1307,7 @@ void wDeiconifyWindow(WWindow *wwin) /* if the window is in another workspace, do it silently */ if (!netwm_hidden) { -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS int ix, iy, iw, ih; if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih)) animateResize(wwin->screen_ptr, ix, iy, iw, ih, @@ -1340,7 +1340,7 @@ void wDeiconifyWindow(WWindow *wwin) wSetFocusTo(wwin->screen_ptr, wwin); -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (!wwin->screen_ptr->flags.startup) { /* Catch up with events not processed while animation was running */ Window clientwin = wwin->client_win; @@ -1390,7 +1390,7 @@ static void hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int a wClientSetState(wwin, IconicState, icon->icon_win); flushExpose(); -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations && !wwin->flags.skip_next_animation && animate) { animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y, @@ -1568,7 +1568,7 @@ static void unhideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int wwin->flags.hidden = 0; -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations && animate) { animateResize(wwin->screen_ptr, icon_x, icon_y, icon->core->width, icon->core->height, @@ -1825,10 +1825,10 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll) head = wGetHeadForWindow(aicon->icon->owner); if (aicon->x_pos != X || aicon->y_pos != Y) { -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (!wPreferences.no_animations) SlideWindow(aicon->icon->core->window, aicon->x_pos, aicon->y_pos, X, Y); -#endif /* ANIMATIONS */ +#endif /* USE_ANIMATIONS */ } wAppIconMove(aicon, X, Y); vars[head].pi++; @@ -1946,7 +1946,7 @@ void wMakeWindowVisible(WWindow *wwin) * Do the animation while shading (called with what = SHADE) * or unshading (what = UNSHADE). */ -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS static void shade_animate(WWindow *wwin, Bool what) { int y, s, w, h; diff --git a/src/misc.c b/src/misc.c index 137d78e..bc324df 100644 --- a/src/misc.c +++ b/src/misc.c @@ -141,7 +141,7 @@ static void eatExpose(void) void move_window(Window win, int from_x, int from_y, int to_x, int to_y) { -#ifdef ANIMATIONS +#ifdef USE_ANIMATIONS if (wPreferences.no_animations) XMoveWindow(dpy, win, to_x, to_y); else diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 4a56e04..be0295c 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -34,7 +34,7 @@ */ /* If you want animations for iconification, shading, icon arrangement etc. */ -#define ANIMATIONS +#define USE_ANIMATIONS /* * Undefine BALLOON_TEXT if you don't want balloons for showing extra -- 2.1.4 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.