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
|
void
|
||||||
close_client(Client * c)
|
kill_client(Client * c)
|
||||||
{
|
{
|
||||||
if(c->proto & PROTO_DEL)
|
if(c->proto & PROTO_DEL)
|
||||||
send_client_message(c->win, wm_protocols, wm_delete);
|
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 short i;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
int i1 = 0, i2 = 0, i3 = 0;
|
int i1 = 0, i2 = 0, i3 = 0;
|
||||||
|
Client *cl;
|
||||||
|
|
||||||
if(!m)
|
if(!m)
|
||||||
return Enofid;
|
return Enofid;
|
||||||
@ -1071,7 +1072,9 @@ xwrite(IXPConn *c, Fcall *fcall)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Dclient:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -1133,15 +1136,13 @@ xwrite(IXPConn *c, Fcall *fcall)
|
|||||||
resize_client(client[i], &client[i]->frame.rect, 0);
|
resize_client(client[i], &client[i]->frame.rect, 0);
|
||||||
break;
|
break;
|
||||||
case Fgeom:
|
case Fgeom:
|
||||||
{
|
cl = page[i1]->area[i2]->client[i3];
|
||||||
Client *c = page[i1]->area[i2]->client[i3];
|
if(fcall->count > sizeof(buf))
|
||||||
if(fcall->count > sizeof(buf))
|
return "geometry values out of range";
|
||||||
return "geometry values out of range";
|
memcpy(buf, fcall->data, fcall->count);
|
||||||
memcpy(buf, fcall->data, fcall->count);
|
buf[fcall->count] = 0;
|
||||||
buf[fcall->count] = 0;
|
blitz_strtorect(&rect, &cl->frame.rect, buf);
|
||||||
blitz_strtorect(&rect, &c->frame.rect, buf);
|
resize_client(cl, &cl->frame.rect, 0);
|
||||||
resize_client(c, &c->frame.rect, 0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case Fexpand:
|
case Fexpand:
|
||||||
{
|
{
|
||||||
|
@ -210,7 +210,7 @@ Client *alloc_client(Window w, XWindowAttributes *wa);
|
|||||||
void destroy_client(Client * c);
|
void destroy_client(Client * c);
|
||||||
void configure_client(Client * c);
|
void configure_client(Client * c);
|
||||||
void handle_client_property(Client * c, XPropertyEvent * e);
|
void handle_client_property(Client * c, XPropertyEvent * e);
|
||||||
void close_client(Client * c);
|
void kill_client(Client * c);
|
||||||
void draw_client(Client * client);
|
void draw_client(Client * client);
|
||||||
void gravitate(Client * c, unsigned int tabh, unsigned int bw, int invert);
|
void gravitate(Client * c, unsigned int tabh, unsigned int bw, int invert);
|
||||||
void unmap_client(Client * c);
|
void unmap_client(Client * c);
|
||||||
|
Loading…
Reference in New Issue
Block a user