-grabbuttons(Client *c, Bool focus)
-{
+detachstack(Client *c) {
+ Client **tc;
+ for(tc=&stack; *tc && *tc != c; tc=&(*tc)->snext);
+ *tc = c->snext;
+}
+
+static void
+grabbuttons(Client *c, Bool focused) {
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
XGrabButton(dpy, Button1, MODKEY, c->win, False, BUTTONMASK,
GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button1, MODKEY | LockMask, c->win, False, BUTTONMASK,
XGrabButton(dpy, Button1, MODKEY, c->win, False, BUTTONMASK,
GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button1, MODKEY | LockMask, c->win, False, BUTTONMASK,
else
XGrabButton(dpy, AnyButton, AnyModifier, c->win, False, BUTTONMASK,
GrabModeAsync, GrabModeSync, None, None);
else
XGrabButton(dpy, AnyButton, AnyModifier, c->win, False, BUTTONMASK,
GrabModeAsync, GrabModeSync, None, None);
XMoveResizeWindow(dpy, c->twin, c->tx, c->ty, c->tw, c->th);
else
XMoveResizeWindow(dpy, c->twin, c->tx + 2 * sw, c->ty, c->tw, c->th);
XMoveResizeWindow(dpy, c->twin, c->tx, c->ty, c->tw, c->th);
else
XMoveResizeWindow(dpy, c->twin, c->tx + 2 * sw, c->ty, c->tw, c->th);
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
XMoveWindow(dpy, c->twin, c->tx + 2 * sw, c->ty);
}
void
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
XMoveWindow(dpy, c->twin, c->tx + 2 * sw, c->ty);
}
void
grabbuttons(c, True);
drawtitle(c);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
grabbuttons(c, True);
drawtitle(c);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
- if((tc = getclient(trans))) /* inherit tags */
- for(i = 0; i < ntags; i++)
- c->tags[i] = tc->tags[i];
- else
- settags(c);
+ settags(c, getclient(trans));
- XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
+ XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
-togglemax(Arg *arg)
-{
- int ox, oy, ow, oh;
- Client *c;
- XEvent ev;
-
- if(!sel)
- return;
-
- if((maximized = !maximized)) {
- ox = sel->x;
- oy = sel->y;
- ow = sel->w;
- oh = sel->h;
- sel->x = sx;
- sel->y = sy + bh;
- sel->w = sw - 2;
- sel->h = sh - 2 - bh;
-
- restack();
- for(c = getnext(clients); c; c = getnext(c->next))
- if(c != sel)
- ban(c);
- resize(sel, arrange == dofloat, TopLeft);
-
- sel->x = ox;
- sel->y = oy;
- sel->w = ow;
- sel->h = oh;
- }
- else
- arrange(NULL);
- while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
-}
+unmanage(Client *c) {
+ Client *nc;
}
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
}
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);