1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-26 08:22:37 +01:00

Delete WINDOW_BIRTH_ZOOM and default to WINDOW_BIRTH_ZOOM2

WINDOW_BIRTH_ZOOM was a bit lame and it makes sense to not have
it at all. So remove the trailing "2" of WINDOW_BIRTH_ZOOM2 and
make it the only choice (you can #define it in src/wconfig.h.in).

Note that it uses the same algorithm as the animation to resize,
ie zoom, twist or flip. You can choose them in WPrefs.
This commit is contained in:
Carlos R. Mafra
2009-10-10 18:27:52 +02:00
parent 06d3360224
commit e9309e1e39
2 changed files with 6 additions and 52 deletions

View File

@@ -352,51 +352,10 @@ Pixmap MakeGhostIcon(WScreen * scr, Drawable drawable)
}
#ifdef WINDOW_BIRTH_ZOOM
void DoWindowBirth(WWindow * wwin)
{
int width = wwin->frame->core->width;
int height = wwin->frame->core->height;
int w = WMIN(width, 20);
int h = WMIN(height, 20);
int x, y;
int dw, dh;
int i;
time_t time0 = time(NULL);
dw = (width - w) / WINDOW_BIRTH_STEPS;
dh = (height - h) / WINDOW_BIRTH_STEPS;
x = wwin->frame_x + (width - w) / 2;
y = wwin->frame_y + (height - h) / 2;
XMoveResizeWindow(dpy, wwin->frame->core->window, x, y, w, h);
XMapWindow(dpy, wwin->frame->core->window);
XFlush(dpy);
for (i = 0; i < WINDOW_BIRTH_STEPS; i++) {
x -= dw / 2 + dw % 2;
y -= dh / 2 + dh % 2;
w += dw;
h += dh;
XMoveResizeWindow(dpy, wwin->frame->core->window, x, y, w, h);
XFlush(dpy);
/* a timeout */
if (time(NULL) - time0 > MAX_ANIMATION_TIME)
break;
}
XMoveResizeWindow(dpy, wwin->frame->core->window, wwin->frame_x, wwin->frame_y, width, height);
XFlush(dpy);
}
#else
#ifdef WINDOW_BIRTH_ZOOM2
extern void animateResize();
void DoWindowBirth(WWindow * wwin)
void DoWindowBirth(WWindow *wwin)
{
/* dummy stub */
int center_x, center_y;
int width = wwin->frame->core->width;
int height = wwin->frame->core->height;
@@ -410,12 +369,11 @@ void DoWindowBirth(WWindow * wwin)
animateResize(scr, center_x, center_y, 1, 1, wwin->frame_x, wwin->frame_y, width, height, 0);
}
#else
void DoWindowBirth(WWindow * wwin)
void DoWindowBirth(WWindow *wwin)
{
/* dummy stub */
}
#endif
#endif
#ifdef SILLYNESS
static WMPixmap *data[12];

View File

@@ -145,10 +145,9 @@
/*
* #define if you want the window creation animation when superfluous
* is enabled. Only enable one of them.
* is enabled.
*/
#undef WINDOW_BIRTH_ZOOM
#undef WINDOW_BIRTH_ZOOM2
#define WINDOW_BIRTH_ZOOM
/* whether arrow drawing in clip buttons should be gradiented */
#undef GRADIENT_CLIP_ARROWS
@@ -323,9 +322,6 @@
#define WORKSPACE_NAME_DELAY 400
/* window birth animation steps (DO NOT MAKE IT RUN-TIME) */
#define WINDOW_BIRTH_STEPS 20
/* number of steps for icon dematerialization. */
#define DEMATERIALIZE_STEPS 16
@@ -336,8 +332,8 @@
#define ICON_KABOOM_PIECE_SIZE 4
/*
* Position increment for smart placement: >= 1
* Raise these values if it's too slow for you
* Position increment for smart placement: >= 1
* Raise these values if it's too slow for you
*/
#define PLACETEST_HSTEP 8
#define PLACETEST_VSTEP 8