From 0937cc78bf5d8855dcd757b18e10c7dd49e7a1ab Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Sun, 12 Aug 2007 13:10:21 +0200 Subject: moved floating to layout.c, kept tile.c outside --- layout.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'layout.c') diff --git a/layout.c b/layout.c index 408a2a3..fe12e1e 100644 --- a/layout.c +++ b/layout.c @@ -13,6 +13,24 @@ LAYOUTS /* extern */ +void +floating(void) { + Client *c; + + if(lt->arrange != floating) + return; + + for(c = clients; c; c = c->next) + if(isvisible(c)) { + unban(c); + resize(c, c->x, c->y, c->w, c->h, True); + } + else + ban(c); + focus(NULL); + restack(); +} + void focusclient(const char *arg) { Client *c; @@ -115,3 +133,22 @@ togglebar(const char *arg) { updatebarpos(); lt->arrange(); } + +void +togglemax(const char *arg) { + XEvent ev; + + if(!sel || (lt->arrange != floating && !sel->isfloating) || sel->isfixed) + return; + if((sel->ismax = !sel->ismax)) { + sel->rx = sel->x; + sel->ry = sel->y; + sel->rw = sel->w; + sel->rh = sel->h; + resize(sel, wax, way, waw - 2 * sel->border, wah - 2 * sel->border, True); + } + else + resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True); + drawstatus(); + while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); +} -- cgit 1.4.1-2-gfad0