mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
Code refactoring: replaced macro 'ANIMATIONS' by 'USE_ANIMATIONS' 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
9d9b6d3fcf
commit
6ef010d974
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user