From b014ef277085810a97a8d622ebb7be5062d3d9af Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Sat, 10 Oct 2009 18:47:32 +0200 Subject: [PATCH] Remove 'hiding' parameter from animateResize() It was a bit pointless. --- src/actions.c | 20 +++++++++----------- src/superfluous.c | 2 +- src/wconfig.h.in | 2 -- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/actions.c b/src/actions.c index 2aae7581..d7bf5036 100644 --- a/src/actions.c +++ b/src/actions.c @@ -811,10 +811,10 @@ static void animateResizeZoom(WScreen * scr, int x, int y, int w, int h, int fx, #undef FRAMES -void animateResize(WScreen * scr, int x, int y, int w, int h, int fx, int fy, int fw, int fh, int hiding) +void animateResize(WScreen *scr, int x, int y, int w, int h, int fx, int fy, int fw, int fh) { int style = wPreferences.iconification_style; /* Catch the value */ - int steps, k; + int steps; if (style == WIS_NONE) return; @@ -823,22 +823,20 @@ void animateResize(WScreen * scr, int x, int y, int w, int h, int fx, int fy, in style = rand() % 3; } - k = (hiding ? 2 : 3); - switch (style) { case WIS_TWIST: - steps = (MINIATURIZE_ANIMATION_STEPS_T * k) / 3; + steps = MINIATURIZE_ANIMATION_STEPS_T; if (steps > 0) animateResizeTwist(scr, x, y, w, h, fx, fy, fw, fh, steps); break; case WIS_FLIP: - steps = (MINIATURIZE_ANIMATION_STEPS_F * k) / 3; + steps = MINIATURIZE_ANIMATION_STEPS_F; if (steps > 0) animateResizeFlip(scr, x, y, w, h, fx, fy, fw, fh, steps); break; case WIS_ZOOM: default: - steps = (MINIATURIZE_ANIMATION_STEPS_Z * k) / 3; + steps = MINIATURIZE_ANIMATION_STEPS_Z; if (steps > 0) animateResizeZoom(scr, x, y, w, h, fx, fy, fw, fh, steps); break; @@ -1056,7 +1054,7 @@ void wIconifyWindow(WWindow * wwin) } } animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y, - wwin->frame->core->width, wwin->frame->core->height, ix, iy, iw, ih, False); + wwin->frame->core->width, wwin->frame->core->height, ix, iy, iw, ih); } #endif } @@ -1217,7 +1215,7 @@ void wDeiconifyWindow(WWindow * wwin) } animateResize(wwin->screen_ptr, ix, iy, iw, ih, wwin->frame_x, wwin->frame_y, - wwin->frame->core->width, wwin->frame->core->height, False); + wwin->frame->core->width, wwin->frame->core->height); } #endif /* ANIMATIONS */ wwin->flags.skip_next_animation = 0; @@ -1303,7 +1301,7 @@ static void hideWindow(WIcon * icon, int icon_x, int icon_y, WWindow * wwin, int !wwin->flags.skip_next_animation && animate) { animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y, wwin->frame->core->width, wwin->frame->core->height, - icon_x, icon_y, icon->core->width, icon->core->height, True); + icon_x, icon_y, icon->core->width, icon->core->height); } #endif wwin->flags.skip_next_animation = 0; @@ -1434,7 +1432,7 @@ static void unhideWindow(WIcon * icon, int icon_x, int icon_y, WWindow * wwin, i animateResize(wwin->screen_ptr, icon_x, icon_y, icon->core->width, icon->core->height, wwin->frame_x, wwin->frame_y, - wwin->frame->core->width, wwin->frame->core->height, True); + wwin->frame->core->width, wwin->frame->core->height); } #endif wwin->flags.skip_next_animation = 0; diff --git a/src/superfluous.c b/src/superfluous.c index 9b94b145..1661c331 100644 --- a/src/superfluous.c +++ b/src/superfluous.c @@ -366,7 +366,7 @@ void DoWindowBirth(WWindow *wwin) center_x = wwin->frame_x + (width - w) / 2; center_y = wwin->frame_y + (height - h) / 2; - animateResize(scr, center_x, center_y, 1, 1, wwin->frame_x, wwin->frame_y, width, height, 0); + animateResize(scr, center_x, center_y, 1, 1, wwin->frame_x, wwin->frame_y, width, height); } #else void DoWindowBirth(WWindow *wwin) diff --git a/src/wconfig.h.in b/src/wconfig.h.in index a3f4fc32..bb269640 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -251,8 +251,6 @@ #define MINIATURIZE_ANIMATION_DELAY_F 20000 #define MINIATURIZE_ANIMATION_TWIST_F 0.5 -#define HIDE_ANIMATION_STEPS (MINIATURIZE_ANIMATION_STEPS*2/3) - /* delays in ms...*/ #define BALLOON_DELAY 1000 /* ...before balloon is shown */ #define MENU_SELECT_DELAY 200 /* ...for menu item selection hysteresis */ -- 2.11.4.GIT