diff -r a2c094196714 dwm.c --- a/dwm.c Mon Apr 20 11:03:33 2009 +0100 +++ b/dwm.c Fri May 01 22:16:50 2009 +0800 @@ -233,6 +233,7 @@ static Client *clients = NULL; static Client *sel = NULL; static Client *stack = NULL; +static Client *panel = NULL; static Cursor cursor[CurLast]; static Display *dpy; static DC dc; @@ -268,7 +269,8 @@ if(ch.res_name) XFree(ch.res_name); } - c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : tagset[seltags]; + if(!c->tags && panel != c) + c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : tagset[seltags]; } Bool @@ -793,7 +795,7 @@ unsigned int i, j; unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; XUngrabButton(dpy, AnyButton, AnyModifier, c->win); - if(focused) { + if(focused || panel == c) { for(i = 0; i < LENGTH(buttons); i++) if(buttons[i].click == ClkClientWin) for(j = 0; j < LENGTH(modifiers); j++) @@ -944,6 +946,13 @@ c->bw = borderpx; } + updatetitle(c); + if(strstr(c->name, "panel") || strstr(c->name, "stalonetray")) { + panel = c; + c->bw = 0; + wh = sh - bh - panel->h; + } + wc.border_width = c->bw; XConfigureWindow(dpy, w, CWBorderWidth, &wc); XSetWindowBorder(dpy, w, dc.norm[ColBorder]); @@ -1334,7 +1343,7 @@ showhide(Client *c) { if(!c) return; - if(ISVISIBLE(c)) { /* show clients top down */ + if(ISVISIBLE(c) || panel == c) { /* show clients top down */ XMoveWindow(dpy, c->win, c->x, c->y); if(!lt[sellt]->arrange || c->isfloating) resize(c, c->x, c->y, c->w, c->h); @@ -1465,6 +1474,11 @@ unmanage(Client *c) { XWindowChanges wc; + if(panel == c) { + panel = NULL; + wh = sh - bh; + } + wc.border_width = c->oldbw; /* The server grab construct avoids race conditions. */ XGrabServer(dpy);