mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Remove 'hiding' parameter from animateResize()
It was a bit pointless.
This commit is contained in:
@@ -811,10 +811,10 @@ static void animateResizeZoom(WScreen * scr, int x, int y, int w, int h, int fx,
|
|||||||
|
|
||||||
#undef FRAMES
|
#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 style = wPreferences.iconification_style; /* Catch the value */
|
||||||
int steps, k;
|
int steps;
|
||||||
|
|
||||||
if (style == WIS_NONE)
|
if (style == WIS_NONE)
|
||||||
return;
|
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;
|
style = rand() % 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
k = (hiding ? 2 : 3);
|
|
||||||
|
|
||||||
switch (style) {
|
switch (style) {
|
||||||
case WIS_TWIST:
|
case WIS_TWIST:
|
||||||
steps = (MINIATURIZE_ANIMATION_STEPS_T * k) / 3;
|
steps = MINIATURIZE_ANIMATION_STEPS_T;
|
||||||
if (steps > 0)
|
if (steps > 0)
|
||||||
animateResizeTwist(scr, x, y, w, h, fx, fy, fw, fh, steps);
|
animateResizeTwist(scr, x, y, w, h, fx, fy, fw, fh, steps);
|
||||||
break;
|
break;
|
||||||
case WIS_FLIP:
|
case WIS_FLIP:
|
||||||
steps = (MINIATURIZE_ANIMATION_STEPS_F * k) / 3;
|
steps = MINIATURIZE_ANIMATION_STEPS_F;
|
||||||
if (steps > 0)
|
if (steps > 0)
|
||||||
animateResizeFlip(scr, x, y, w, h, fx, fy, fw, fh, steps);
|
animateResizeFlip(scr, x, y, w, h, fx, fy, fw, fh, steps);
|
||||||
break;
|
break;
|
||||||
case WIS_ZOOM:
|
case WIS_ZOOM:
|
||||||
default:
|
default:
|
||||||
steps = (MINIATURIZE_ANIMATION_STEPS_Z * k) / 3;
|
steps = MINIATURIZE_ANIMATION_STEPS_Z;
|
||||||
if (steps > 0)
|
if (steps > 0)
|
||||||
animateResizeZoom(scr, x, y, w, h, fx, fy, fw, fh, steps);
|
animateResizeZoom(scr, x, y, w, h, fx, fy, fw, fh, steps);
|
||||||
break;
|
break;
|
||||||
@@ -1056,7 +1054,7 @@ void wIconifyWindow(WWindow * wwin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y,
|
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
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1217,7 +1215,7 @@ void wDeiconifyWindow(WWindow * wwin)
|
|||||||
}
|
}
|
||||||
animateResize(wwin->screen_ptr, ix, iy, iw, ih,
|
animateResize(wwin->screen_ptr, ix, iy, iw, ih,
|
||||||
wwin->frame_x, wwin->frame_y,
|
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 */
|
#endif /* ANIMATIONS */
|
||||||
wwin->flags.skip_next_animation = 0;
|
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) {
|
!wwin->flags.skip_next_animation && animate) {
|
||||||
animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y,
|
animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y,
|
||||||
wwin->frame->core->width, wwin->frame->core->height,
|
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
|
#endif
|
||||||
wwin->flags.skip_next_animation = 0;
|
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,
|
animateResize(wwin->screen_ptr, icon_x, icon_y,
|
||||||
icon->core->width, icon->core->height,
|
icon->core->width, icon->core->height,
|
||||||
wwin->frame_x, wwin->frame_y,
|
wwin->frame_x, wwin->frame_y,
|
||||||
wwin->frame->core->width, wwin->frame->core->height, True);
|
wwin->frame->core->width, wwin->frame->core->height);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
wwin->flags.skip_next_animation = 0;
|
wwin->flags.skip_next_animation = 0;
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ void DoWindowBirth(WWindow *wwin)
|
|||||||
center_x = wwin->frame_x + (width - w) / 2;
|
center_x = wwin->frame_x + (width - w) / 2;
|
||||||
center_y = wwin->frame_y + (height - h) / 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
|
#else
|
||||||
void DoWindowBirth(WWindow *wwin)
|
void DoWindowBirth(WWindow *wwin)
|
||||||
|
|||||||
@@ -251,8 +251,6 @@
|
|||||||
#define MINIATURIZE_ANIMATION_DELAY_F 20000
|
#define MINIATURIZE_ANIMATION_DELAY_F 20000
|
||||||
#define MINIATURIZE_ANIMATION_TWIST_F 0.5
|
#define MINIATURIZE_ANIMATION_TWIST_F 0.5
|
||||||
|
|
||||||
#define HIDE_ANIMATION_STEPS (MINIATURIZE_ANIMATION_STEPS*2/3)
|
|
||||||
|
|
||||||
/* delays in ms...*/
|
/* delays in ms...*/
|
||||||
#define BALLOON_DELAY 1000 /* ...before balloon is shown */
|
#define BALLOON_DELAY 1000 /* ...before balloon is shown */
|
||||||
#define MENU_SELECT_DELAY 200 /* ...for menu item selection hysteresis */
|
#define MENU_SELECT_DELAY 200 /* ...for menu item selection hysteresis */
|
||||||
|
|||||||
Reference in New Issue
Block a user