mirror of
https://github.com/0intro/wmii
synced 2024-12-16 00:22:37 +03:00
fixed bug reported by bogon
This commit is contained in:
parent
f2123391a9
commit
c70e73bf2d
@ -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);
|
||||
|
21
cmd/wm/fs.c
21
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:
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user