mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +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
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user