diff --git a/src/superfluous.c b/src/superfluous.c index 78679aed..135ce429 100644 --- a/src/superfluous.c +++ b/src/superfluous.c @@ -33,7 +33,6 @@ #include "WindowMaker.h" #include "screen.h" -#include "dock.h" #include "superfluous.h" #include "framewin.h" #include "window.h" @@ -41,14 +40,22 @@ #include "xinerama.h" #include "stacking.h" +#define PIECES ((64/ICON_KABOOM_PIECE_SIZE)*(64/ICON_KABOOM_PIECE_SIZE)) +#define KAB_PRECISION 4 +#define BOUNCE_HZ 25 +#define BOUNCE_DELAY (1000/BOUNCE_HZ) +#define BOUNCE_HEIGHT 24 +#define BOUNCE_LENGTH 0.3 +#define BOUNCE_DAMP 0.6 +#define URGENT_BOUNCE_DELAY 3000 + extern WPreferences wPreferences; -#ifdef NORMAL_ICON_KABOOM void DoKaboom(WScreen * scr, Window win, int x, int y) { +#ifdef NORMAL_ICON_KABOOM int i, j, k; int sw = scr->scr_width, sh = scr->scr_height; -#define KAB_PRECISION 4 int px[PIECES]; short py[PIECES]; char pvx[PIECES], pvy[PIECES]; @@ -127,8 +134,8 @@ void DoKaboom(WScreen * scr, Window win, int x, int y) } XFreePixmap(dpy, tmp); -} #endif /* NORMAL_ICON_KABOOM */ +} Pixmap MakeGhostDock(WDock * dock, int sx, int dx, int y) { @@ -230,10 +237,9 @@ Pixmap MakeGhostIcon(WScreen * scr, Drawable drawable) return pixmap; } -#ifdef WINDOW_BIRTH_ZOOM - void DoWindowBirth(WWindow *wwin) { +#ifdef WINDOW_BIRTH_ZOOM int center_x, center_y; int width = wwin->frame->core->width; int height = wwin->frame->core->height; @@ -245,20 +251,8 @@ void DoWindowBirth(WWindow *wwin) center_y = wwin->frame_y + (height - h) / 2; animateResize(scr, center_x, center_y, 1, 1, wwin->frame_x, wwin->frame_y, width, height); -} -#else -void DoWindowBirth(WWindow *wwin) -{ - /* dummy stub */ -} #endif - -#define BOUNCE_HZ 25 -#define BOUNCE_DELAY (1000/BOUNCE_HZ) -#define BOUNCE_HEIGHT 24 -#define BOUNCE_LENGTH 0.3 -#define BOUNCE_DAMP 0.6 -#define URGENT_BOUNCE_DELAY 3000 +} typedef struct AppBouncerData { WApplication *wapp; diff --git a/src/superfluous.h b/src/superfluous.h index 88118430..b7b70b1a 100644 --- a/src/superfluous.h +++ b/src/superfluous.h @@ -21,9 +21,10 @@ #ifndef WMSUPERFLUOUS_H #define WMSUPERFLUOUS_H -#define PIECES ((64/ICON_KABOOM_PIECE_SIZE)*(64/ICON_KABOOM_PIECE_SIZE)) +#include "dock.h" -extern void DoKaboom(WScreen *scr, Window win, int x, int y); -extern Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y); -extern Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable); -#endif /* WMSUPERFLUOUS_H */ +void DoKaboom(WScreen *scr, Window win, int x, int y); +Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y); +Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable); +void DoWindowBirth(WWindow *wwin); +#endif diff --git a/src/window.c b/src/window.c index b3802eb5..91ad63f5 100644 --- a/src/window.c +++ b/src/window.c @@ -57,6 +57,7 @@ #include "xinerama.h" #include "appmenu.h" #include "appicon.h" +#include "superfluous.h" #ifdef MWM_HINTS # include "motif.h" @@ -82,9 +83,6 @@ extern Atom _XA_WINDOWMAKER_STATE; extern WPreferences wPreferences; extern Time LastTimestamp; -/* superfluous... */ -extern void DoWindowBirth(WWindow *wwin); - /***** Local Stuff *****/ static WWindowState *windowState = NULL; static FocusMode getFocusMode(WWindow *wwin);