From 87161c5e0cb6d2c636d42e531e17d134276f7bb9 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Sat, 10 Oct 2009 19:22:31 +0200 Subject: [PATCH] Remove MINIATURIZE_ANIMATION_DELAY_{Z,F,T} tests We know that they are non-zero because we set their values explicitly in wconfig.h.in, so there is no point in checking them. --- src/actions.c | 18 ++---------------- src/superfluous.c | 3 --- src/wconfig.h.in | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/actions.c b/src/actions.c index 11834cb1..5cb0f40b 100644 --- a/src/actions.c +++ b/src/actions.c @@ -662,11 +662,7 @@ static void animateResizeFlip(WScreen * scr, int x, int y, int w, int h, int fx, XGrabServer(dpy); XDrawLines(dpy, scr->root_win, scr->frame_gc, points, 5, CoordModeOrigin); XFlush(dpy); -#if (MINIATURIZE_ANIMATION_DELAY_F > 0) wusleep(MINIATURIZE_ANIMATION_DELAY_F); -#else - wusleep(10); -#endif XDrawLines(dpy, scr->root_win, scr->frame_gc, points, 5, CoordModeOrigin); XUngrabServer(dpy); @@ -729,11 +725,7 @@ animateResizeTwist(WScreen * scr, int x, int y, int w, int h, int fx, int fy, in XGrabServer(dpy); XDrawLines(dpy, scr->root_win, scr->frame_gc, points, 5, CoordModeOrigin); XFlush(dpy); -#if (MINIATURIZE_ANIMATION_DELAY_T > 0) wusleep(MINIATURIZE_ANIMATION_DELAY_T); -#else - wusleep(10); -#endif XDrawLines(dpy, scr->root_win, scr->frame_gc, points, 5, CoordModeOrigin); XUngrabServer(dpy); @@ -775,11 +767,8 @@ static void animateResizeZoom(WScreen * scr, int x, int y, int w, int h, int fx, (int)cx[j], (int)cy[j], (int)cw[j], (int)ch[j]); } XFlush(dpy); -#if (MINIATURIZE_ANIMATION_DELAY_Z > 0) wusleep(MINIATURIZE_ANIMATION_DELAY_Z); -#else - wusleep(10); -#endif + for (j = 0; j < FRAMES; j++) { XDrawRectangle(dpy, scr->root_win, scr->frame_gc, (int)cx[j], (int)cy[j], (int)cw[j], (int)ch[j]); @@ -801,11 +790,8 @@ static void animateResizeZoom(WScreen * scr, int x, int y, int w, int h, int fx, XDrawRectangle(dpy, scr->root_win, scr->frame_gc, (int)cx[j], (int)cy[j], (int)cw[j], (int)ch[j]); } XFlush(dpy); -#if (MINIATURIZE_ANIMATION_DELAY_Z > 0) wusleep(MINIATURIZE_ANIMATION_DELAY_Z); -#else - wusleep(10); -#endif + for (j = 0; j < FRAMES; j++) { XDrawRectangle(dpy, scr->root_win, scr->frame_gc, (int)cx[j], (int)cy[j], (int)cw[j], (int)ch[j]); } diff --git a/src/superfluous.c b/src/superfluous.c index 84082218..ffabf461 100644 --- a/src/superfluous.c +++ b/src/superfluous.c @@ -242,10 +242,7 @@ void DoKaboom(WScreen * scr, Window win, int x, int y) } XFlush(dpy); - -#if (MINIATURIZE_ANIMATION_DELAY_Z > 0) wusleep(MINIATURIZE_ANIMATION_DELAY_Z * 2); -#endif } XFreePixmap(dpy, tmp); diff --git a/src/wconfig.h.in b/src/wconfig.h.in index bb269640..4fa63893 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -233,7 +233,7 @@ /* max. time to spend doing animations in seconds. If the animation * time exceeds this value, it is immediately finished. Usefull for - * moments of high-load. + * moments of high-load. DO NOT set *_DELAY_{Z,T,F} to zero! */ #define MAX_ANIMATION_TIME 1 /* Zoom animation */