mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
- Made dock/clip steal appicons of applications that were started from a
shell/xterm or from the main menu, if there is a docked appicon of that class that is not running at the time the app is launched. - Added animation to show that the appicon was stolen by the dock (the way NEXTSTEP did - map an appicon as it normally would have been, then slide it to the position the docked appicon is). - Updated the animation constants for scrolling/sliding/shading to better adapt to newer/faster machines. Also used wusleep(10) when the delay was 0 to get rid of the jerky animation when there was no delay.
This commit is contained in:
@@ -29,6 +29,15 @@ Changes since version 0.70.0:
|
||||
appicon).
|
||||
- Fixed user and global defaults domain merging to preserve values present in
|
||||
global but not in user in subdictionaries.
|
||||
- Made dock/clip steal appicons of applications that were started from a
|
||||
shell/xterm or from the main menu, if there is a docked appicon of that
|
||||
class that is not running at the time the app is launched.
|
||||
- Added animation to show that the appicon was stolen by the dock (the way
|
||||
NEXTSTEP did - map an appicon as it normally would have been, then slide it
|
||||
to the position the docked appicon is).
|
||||
- Updated the animation constants for scrolling/sliding/shading to better
|
||||
adapt to newer/faster machines. Also used wusleep(10) when the delay was 0
|
||||
to get rid of the jerky animation when there was no delay.
|
||||
|
||||
|
||||
Changes since version 0.65.1:
|
||||
|
||||
@@ -78,7 +78,7 @@ static struct {
|
||||
{SHADE_STEPS_F, SHADE_DELAY_F},
|
||||
{SHADE_STEPS_M, SHADE_DELAY_M},
|
||||
{SHADE_STEPS_S, SHADE_DELAY_S},
|
||||
{SHADE_STEPS_U, SHADE_DELAY_U}};
|
||||
{SHADE_STEPS_US, SHADE_DELAY_US}};
|
||||
|
||||
#define SHADE_STEPS shadePars[(int)wPreferences.shade_speed].steps
|
||||
#define SHADE_DELAY shadePars[(int)wPreferences.shade_speed].delay
|
||||
@@ -286,8 +286,11 @@ wShadeWindow(WWindow *wwin)
|
||||
if (time(NULL)-time0 > MAX_ANIMATION_TIME)
|
||||
break;
|
||||
|
||||
if (SHADE_DELAY > 0)
|
||||
if (SHADE_DELAY > 0) {
|
||||
wusleep(SHADE_DELAY*1000L);
|
||||
} else {
|
||||
wusleep(10);
|
||||
}
|
||||
h-=s;
|
||||
y-=s;
|
||||
}
|
||||
@@ -363,8 +366,11 @@ wUnshadeWindow(WWindow *wwin)
|
||||
XResizeWindow(dpy, wwin->frame->core->window, w, h);
|
||||
XMoveWindow(dpy, wwin->client_win, 0, y);
|
||||
XFlush(dpy);
|
||||
if (SHADE_DELAY > 0)
|
||||
if (SHADE_DELAY > 0) {
|
||||
wusleep(SHADE_DELAY*2000L/3);
|
||||
} else {
|
||||
wusleep(10);
|
||||
}
|
||||
h+=s;
|
||||
y+=s;
|
||||
|
||||
@@ -561,6 +567,8 @@ animateResizeFlip(WScreen *scr, int x, int y, int w, int h,
|
||||
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);
|
||||
@@ -627,6 +635,8 @@ animateResizeTwist(WScreen *scr, int x, int y, int w, int h,
|
||||
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);
|
||||
@@ -673,6 +683,8 @@ animateResizeZoom(WScreen *scr, int x, int y, int w, int h,
|
||||
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,
|
||||
@@ -698,6 +710,8 @@ animateResizeZoom(WScreen *scr, int x, int y, int w, int h,
|
||||
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,
|
||||
|
||||
@@ -277,10 +277,6 @@ drawCorner(WIcon *icon)
|
||||
void
|
||||
wAppIconMove(WAppIcon *aicon, int x, int y)
|
||||
{
|
||||
WApplication *app;
|
||||
|
||||
app = wApplicationOf(aicon->icon->owner->main_window);
|
||||
|
||||
XMoveWindow(dpy, aicon->icon->core->window, x, y);
|
||||
aicon->x_pos = x;
|
||||
aicon->y_pos = y;
|
||||
|
||||
@@ -363,12 +363,10 @@ wApplicationCreate(WScreen *scr, Window main_window)
|
||||
|
||||
if (clip && clip->attract_icons && wDockFindFreeSlot(clip, &x, &y)) {
|
||||
wapp->app_icon->attracted = 1;
|
||||
if (!wapp->app_icon->icon->shadowed) {
|
||||
wapp->app_icon->icon->shadowed = 1;
|
||||
wapp->app_icon->icon->force_paint = 1;
|
||||
/* We don't do an wAppIconPaint() here because it's in
|
||||
* wDockAttachIcon(). -Dan.
|
||||
*/
|
||||
if (!icon->shadowed) {
|
||||
icon->shadowed = 1;
|
||||
icon->force_paint = 1;
|
||||
/* wAppIconPaint() is done in wDockAttachIcon() below */
|
||||
}
|
||||
wDockAttachIcon(clip, wapp->app_icon, x, y);
|
||||
} else {
|
||||
|
||||
29
src/dock.c
29
src/dock.c
@@ -3172,8 +3172,7 @@ retry:
|
||||
}
|
||||
|
||||
if ((icon->wm_instance || icon->wm_class)
|
||||
&& (icon->launching
|
||||
|| (dock->screen_ptr->flags.startup && !icon->running))) {
|
||||
&& (icon->launching || !icon->running)) {
|
||||
|
||||
if (icon->wm_instance && wm_instance &&
|
||||
strcmp(icon->wm_instance, wm_instance)!=0) {
|
||||
@@ -3202,7 +3201,31 @@ retry:
|
||||
icon->main_window = window;
|
||||
|
||||
}
|
||||
found = True;
|
||||
found = True;
|
||||
if (!wPreferences.no_animations && !icon->launching &&
|
||||
!dock->screen_ptr->flags.startup) {
|
||||
WAppIcon *aicon;
|
||||
int x0, y0;
|
||||
|
||||
icon->launching = 1;
|
||||
dockIconPaint(icon);
|
||||
|
||||
aicon = wAppIconCreateForDock(dock->screen_ptr, NULL,
|
||||
wm_instance, wm_class,
|
||||
TILE_NORMAL);
|
||||
PlaceIcon(dock->screen_ptr, &x0, &y0);
|
||||
wAppIconMove(aicon, x0, y0);
|
||||
/* Should this always be lowered? -Dan */
|
||||
if (dock->lowered)
|
||||
wLowerFrame(aicon->icon->core);
|
||||
XMapWindow(dpy, aicon->icon->core->window);
|
||||
aicon->launching = 1;
|
||||
wAppIconPaint(aicon);
|
||||
SlideWindow(aicon->icon->core->window, x0, y0,
|
||||
icon->x_pos, icon->y_pos);
|
||||
XUnmapWindow(dpy, aicon->icon->core->window);
|
||||
wAppIconDestroy(aicon);
|
||||
}
|
||||
wDockFinishLaunch(dock, icon);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ static struct {
|
||||
{MENU_SCROLL_STEPS_F, MENU_SCROLL_DELAY_F},
|
||||
{MENU_SCROLL_STEPS_M, MENU_SCROLL_DELAY_M},
|
||||
{MENU_SCROLL_STEPS_S, MENU_SCROLL_DELAY_S},
|
||||
{MENU_SCROLL_STEPS_U, MENU_SCROLL_DELAY_U}};
|
||||
{MENU_SCROLL_STEPS_US, MENU_SCROLL_DELAY_US}};
|
||||
|
||||
|
||||
static void menuMouseDown(WObjDescriptor *desc, XEvent *event);
|
||||
|
||||
@@ -350,7 +350,7 @@ SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y)
|
||||
{ICON_SLIDE_DELAY_F, ICON_SLIDE_STEPS_F, ICON_SLIDE_SLOWDOWN_F},
|
||||
{ICON_SLIDE_DELAY_M, ICON_SLIDE_STEPS_M, ICON_SLIDE_SLOWDOWN_M},
|
||||
{ICON_SLIDE_DELAY_S, ICON_SLIDE_STEPS_S, ICON_SLIDE_SLOWDOWN_S},
|
||||
{ICON_SLIDE_DELAY_U, ICON_SLIDE_STEPS_U, ICON_SLIDE_SLOWDOWN_U}};
|
||||
{ICON_SLIDE_DELAY_US, ICON_SLIDE_STEPS_US, ICON_SLIDE_SLOWDOWN_US}};
|
||||
|
||||
|
||||
|
||||
@@ -407,6 +407,8 @@ SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y)
|
||||
XFlush(dpy);
|
||||
if (apars[(int)wPreferences.icon_slide_speed].delay > 0) {
|
||||
wusleep(apars[(int)wPreferences.icon_slide_speed].delay*1000L);
|
||||
} else {
|
||||
wusleep(10);
|
||||
}
|
||||
if (time(NULL) - time0 > MAX_ANIMATION_TIME)
|
||||
break;
|
||||
|
||||
@@ -356,29 +356,29 @@
|
||||
/* *** animation speed constants *** */
|
||||
|
||||
/* icon slide */
|
||||
#define ICON_SLIDE_SLOWDOWN_UF 20
|
||||
#define ICON_SLIDE_SLOWDOWN_UF 1
|
||||
#define ICON_SLIDE_DELAY_UF 0
|
||||
#define ICON_SLIDE_STEPS_UF 15
|
||||
#define ICON_SLIDE_STEPS_UF 50
|
||||
|
||||
#define ICON_SLIDE_SLOWDOWN_F 30
|
||||
#define ICON_SLIDE_SLOWDOWN_F 3
|
||||
#define ICON_SLIDE_DELAY_F 0
|
||||
#define ICON_SLIDE_STEPS_F 10
|
||||
#define ICON_SLIDE_STEPS_F 50
|
||||
|
||||
#define ICON_SLIDE_SLOWDOWN_M 40
|
||||
#define ICON_SLIDE_SLOWDOWN_M 5
|
||||
#define ICON_SLIDE_DELAY_M 0
|
||||
#define ICON_SLIDE_STEPS_M 5
|
||||
#define ICON_SLIDE_STEPS_M 30
|
||||
|
||||
#define ICON_SLIDE_SLOWDOWN_S 50
|
||||
#define ICON_SLIDE_SLOWDOWN_S 10
|
||||
#define ICON_SLIDE_DELAY_S 0
|
||||
#define ICON_SLIDE_STEPS_S 3
|
||||
#define ICON_SLIDE_STEPS_S 20
|
||||
|
||||
#define ICON_SLIDE_SLOWDOWN_U 50
|
||||
#define ICON_SLIDE_DELAY_U 3
|
||||
#define ICON_SLIDE_STEPS_U 3
|
||||
#define ICON_SLIDE_SLOWDOWN_US 20
|
||||
#define ICON_SLIDE_DELAY_US 1
|
||||
#define ICON_SLIDE_STEPS_US 10
|
||||
|
||||
/* menu scrolling */
|
||||
#define MENU_SCROLL_STEPS_UF 14
|
||||
#define MENU_SCROLL_DELAY_UF 0
|
||||
#define MENU_SCROLL_DELAY_UF 1
|
||||
|
||||
#define MENU_SCROLL_STEPS_F 10
|
||||
#define MENU_SCROLL_DELAY_F 5
|
||||
@@ -389,8 +389,8 @@
|
||||
#define MENU_SCROLL_STEPS_S 4
|
||||
#define MENU_SCROLL_DELAY_S 6
|
||||
|
||||
#define MENU_SCROLL_STEPS_U 1
|
||||
#define MENU_SCROLL_DELAY_U 8
|
||||
#define MENU_SCROLL_STEPS_US 1
|
||||
#define MENU_SCROLL_DELAY_US 8
|
||||
|
||||
|
||||
/* shade animation */
|
||||
@@ -406,8 +406,8 @@
|
||||
#define SHADE_STEPS_S 30
|
||||
#define SHADE_DELAY_S 0
|
||||
|
||||
#define SHADE_STEPS_U 20
|
||||
#define SHADE_DELAY_U 10
|
||||
#define SHADE_STEPS_US 40
|
||||
#define SHADE_DELAY_US 10
|
||||
|
||||
|
||||
/* workspace name on switch display */
|
||||
|
||||
Reference in New Issue
Block a user