$NetBSD: patch-ab,v 1.3 2025/12/20 14:58:47 nia Exp $ --- asclock.c.orig 1998-09-26 21:05:03.000000000 +0000 +++ asclock.c @@ -1,4 +1,6 @@ #include +#include +#include #include #include #include @@ -19,6 +21,7 @@ int ICONIFIED=0; /* default is not iconified */ int ONLYSHAPE=0; /* default value is noshape */ int ITBLINKS=1; /* default is blinking */ int ICONIFIED=0; /* default is not iconified */ +int ITDOCKS=0; /* default is not Docking mode */ int YEAR=0; /* default is to show time, not year */ /* led positions *************************************************************/ int twelve[5] = {5, 14, 24, 28, 37}; @@ -77,6 +80,7 @@ void InsertTime(); Pixel GetColor(char *name); void RedrawWindow( XpmIcon *v); void InsertTime(); +int mytime(); /*****************************************************************************/ /*****************************************************************************/ static char *help_message[] = { @@ -85,14 +89,15 @@ static char *help_message[] = { " -24 24 hour format", " -exe program to start on click", " -led color of the led", -" -monthxpm month xpm", " -clockxpm clock xpm", +" -monthxpm month xpm", " -weekdayxpm weekday xpm", +" -year show year instead of time", " -position [+|-]x[+|-]y position of asclock", " -shape without groundplate", " -noblink don't blink", " -iconic start up as icon", -" -year show year instead of time", +" -dock Window Maker docking", NULL }; @@ -173,6 +178,9 @@ int main(int argc,char *argv[]) case 'n': ITBLINKS = 0; continue; + case 'd': + ITDOCKS = 1; + continue; case 'y': YEAR = 1; continue; @@ -256,13 +264,17 @@ int main(int argc,char *argv[]) XShapeCombineMask(dpy, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet); } - mywmhints.initial_state = (ICONIFIED ? IconicState : NormalState); + mywmhints.initial_state = ITDOCKS ? WithdrawnState : + (ICONIFIED ? IconicState : NormalState); mywmhints.icon_window = iconwin; mywmhints.icon_x = mysizehints.x; mywmhints.icon_y = mysizehints.y; - mywmhints.flags = StateHint | IconWindowHint | IconPositionHint; + mywmhints.window_group = win; + mywmhints.flags = StateHint | IconWindowHint | IconPositionHint + | WindowGroupHint; XSetWMHints(dpy, win, &mywmhints); + XSetCommand(dpy, win, argv, argc); XMapWindow(dpy,win); InsertTime();