wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit c70e73bf2dccd2fb008abd0e894514ecc4d2b8a2
parent f2123391a9e341afa88c1e9c8efa4e853ef9f009
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Thu, 16 Feb 2006 15:28:51 +0100

fixed bug reported by bogon


Diffstat:
cmd/wm/client.c | 2+-
cmd/wm/fs.c | 21+++++++++++----------
cmd/wm/wm.h | 2+-
3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -209,7 +209,7 @@ send_client_message(Window w, Atom a, long value) } void -close_client(Client * c) +kill_client(Client * c) { if(c->proto & PROTO_DEL) send_client_message(c->win, wm_protocols, wm_delete); diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c @@ -1028,6 +1028,7 @@ xwrite(IXPConn *c, Fcall *fcall) unsigned short i; unsigned char type; int i1 = 0, i2 = 0, i3 = 0; + Client *cl; if(!m) return Enofid; @@ -1071,7 +1072,9 @@ xwrite(IXPConn *c, Fcall *fcall) } break; case Dclient: - /* /TODO: /n/{float,n}/n/ctl commands */ + cl = page[i1]->area[i2]->client[i3]; + if(!strncmp(buf, "kill", 5)) + kill_client(cl); break; default: break; @@ -1133,15 +1136,13 @@ xwrite(IXPConn *c, Fcall *fcall) resize_client(client[i], &client[i]->frame.rect, 0); break; case Fgeom: - { - Client *c = page[i1]->area[i2]->client[i3]; - if(fcall->count > sizeof(buf)) - return "geometry values out of range"; - memcpy(buf, fcall->data, fcall->count); - buf[fcall->count] = 0; - blitz_strtorect(&rect, &c->frame.rect, buf); - resize_client(c, &c->frame.rect, 0); - } + cl = page[i1]->area[i2]->client[i3]; + if(fcall->count > sizeof(buf)) + return "geometry values out of range"; + memcpy(buf, fcall->data, fcall->count); + buf[fcall->count] = 0; + blitz_strtorect(&rect, &cl->frame.rect, buf); + resize_client(cl, &cl->frame.rect, 0); break; case Fexpand: { diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -210,7 +210,7 @@ Client *alloc_client(Window w, XWindowAttributes *wa); void destroy_client(Client * c); void configure_client(Client * c); void handle_client_property(Client * c, XPropertyEvent * e); -void close_client(Client * c); +void kill_client(Client * c); void draw_client(Client * client); void gravitate(Client * c, unsigned int tabh, unsigned int bw, int invert); void unmap_client(Client * c);