findwin.c (318B)
1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail> 2 * See LICENSE file for license details. 3 */ 4 #include "../x11.h" 5 #include <assert.h> 6 7 Window* 8 findwin(XWindow xw) { 9 Window *w; 10 void **e; 11 12 e = map_get(&windowmap, (ulong)xw, false); 13 if(e) { 14 w = *e; 15 assert(w->xid == xw); 16 return w; 17 } 18 return nil; 19 }