From 8a2a0b6adc48869bc6f74920b59112be0c8574bd Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Thu, 7 Jan 2010 15:38:41 +0100 Subject: [PATCH] Remove ICON_KABOOM_EXTRA I don't want it in the sources, and the "normal" icon kaboom is good enough. And it was #undef'ined by default. --- src/superfluous.c | 47 +---------------------------------------------- src/wconfig.h.in | 5 ----- 2 files changed, 1 insertion(+), 51 deletions(-) diff --git a/src/superfluous.c b/src/superfluous.c index 8bfb994e..59ce334f 100644 --- a/src/superfluous.c +++ b/src/superfluous.c @@ -50,10 +50,6 @@ void DoKaboom(WScreen * scr, Window win, int x, int y) #define KAB_PRECISION 4 int px[PIECES]; short py[PIECES]; -#ifdef ICON_KABOOM_EXTRA - short ptx[2][PIECES], pty[2][PIECES]; - int ll; -#endif char pvx[PIECES], pvy[PIECES]; /* in MkLinux/PPC gcc seems to think that char is unsigned? */ signed char ax[PIECES], ay[PIECES]; @@ -86,12 +82,6 @@ void DoKaboom(WScreen * scr, Window win, int x, int y) py[k] = y + j * ICON_KABOOM_PIECE_SIZE; pvx[k] = rand() % (1 << (KAB_PRECISION + 3)) - (1 << (KAB_PRECISION + 3)) / 2; pvy[k] = -15 - rand() % 7; -#ifdef ICON_KABOOM_EXTRA - for (ll = 0; ll < 2; ll++) { - ptx[ll][k] = px[k]; - pty[ll][k] = py[k]; - } -#endif k++; } else { ax[k] = -1; @@ -114,50 +104,15 @@ void DoKaboom(WScreen * scr, Window win, int x, int y) for (i = 0; i < j; i++) { if (ax[i] >= 0) { int _px = px[i] >> KAB_PRECISION; -#ifdef ICON_KABOOM_EXTRA - XClearArea(dpy, scr->root_win, ptx[1][i], pty[1][i], - ICON_KABOOM_PIECE_SIZE, ICON_KABOOM_PIECE_SIZE, False); - - ptx[1][i] = ptx[0][i]; - pty[1][i] = pty[0][i]; - ptx[0][i] = _px; - pty[0][i] = py[i]; -#else XClearArea(dpy, scr->root_win, _px, py[i], ICON_KABOOM_PIECE_SIZE, ICON_KABOOM_PIECE_SIZE, False); -#endif px[i] += pvx[i]; py[i] += pvy[i]; _px = px[i] >> KAB_PRECISION; pvy[i]++; if (_px < -wPreferences.icon_size || _px > sw || py[i] >= sh) { -#ifdef ICON_KABOOM_EXTRA - if (py[i] > sh && _px < sw && _px > 0) { - pvy[i] = -(pvy[i] / 2); - if (abs(pvy[i]) > 3) { - py[i] = sh - ICON_KABOOM_PIECE_SIZE; - XCopyArea(dpy, tmp, scr->root_win, scr->copy_gc, - ax[i] * ICON_KABOOM_PIECE_SIZE, - ay[i] * ICON_KABOOM_PIECE_SIZE, - ICON_KABOOM_PIECE_SIZE, - ICON_KABOOM_PIECE_SIZE, _px, py[i]); - } else { - ax[i] = -1; - } - } else { - ax[i] = -1; - } - if (ax[i] < 0) { - for (ll = 0; ll < 2; ll++) - XClearArea(dpy, scr->root_win, ptx[ll][i], pty[ll][i], - ICON_KABOOM_PIECE_SIZE, - ICON_KABOOM_PIECE_SIZE, False); - k--; - } -#else /* !ICON_KABOOM_EXTRA */ ax[i] = -1; k--; -#endif /* !ICON_KABOOM_EXTRA */ } else { XCopyArea(dpy, tmp, scr->root_win, scr->copy_gc, ax[i] * ICON_KABOOM_PIECE_SIZE, ay[i] * ICON_KABOOM_PIECE_SIZE, @@ -172,7 +127,7 @@ void DoKaboom(WScreen * scr, Window win, int x, int y) XFreePixmap(dpy, tmp); } -#endif /* NORMAL_ICON_KABOOM */ +#endif /* NORMAL_ICON_KABOOM */ Pixmap MakeGhostDock(WDock * dock, int sx, int dx, int y) { diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 4648a516..0e37793e 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -123,11 +123,6 @@ #undef SHADOW_RESIZEBAR #define NORMAL_ICON_KABOOM -/* - * Define ICON_KABOOM_EXTRA if you want extra fancy icon undocking - * explosion animation. - */ -#undef ICON_KABOOM_EXTRA /* * #define if you want the window creation animation when superfluous -- 2.11.4.GIT