event.c
changeset 971 b2a0dfa22b1d
parent 958 8b502be8b8e0
child 987 ea0cef59c3a3
equal deleted inserted replaced
970:d5c3537ee3be 971:b2a0dfa22b1d
   219 destroynotify(XEvent *e) {
   219 destroynotify(XEvent *e) {
   220 	Client *c;
   220 	Client *c;
   221 	XDestroyWindowEvent *ev = &e->xdestroywindow;
   221 	XDestroyWindowEvent *ev = &e->xdestroywindow;
   222 
   222 
   223 	if((c = getclient(ev->window)))
   223 	if((c = getclient(ev->window)))
   224 		unmanage(c, WithdrawnState);
   224 		unmanage(c);
   225 }
   225 }
   226 
   226 
   227 static void
   227 static void
   228 enternotify(XEvent *e) {
   228 enternotify(XEvent *e) {
   229 	Client *c;
   229 	Client *c;
   330 static void
   330 static void
   331 unmapnotify(XEvent *e) {
   331 unmapnotify(XEvent *e) {
   332 	Client *c;
   332 	Client *c;
   333 	XUnmapEvent *ev = &e->xunmap;
   333 	XUnmapEvent *ev = &e->xunmap;
   334 
   334 
   335 	if((c = getclient(ev->window)) && (ev->event == root)) {
   335 	if((c = getclient(ev->window)))
   336 		if(ev->send_event || c->unmapped-- == 0)
   336 		unmanage(c);
   337 			unmanage(c, WithdrawnState);
       
   338 	}
       
   339 }
   337 }
   340 
   338 
   341 /* extern */
   339 /* extern */
   342 
   340 
   343 void (*handler[LASTEvent]) (XEvent *) = {
   341 void (*handler[LASTEvent]) (XEvent *) = {