handle.c
// we don't track window state internally much, so this is just for info
we don't track window state internally much, so this is just for info
we don ' t track window state internally much so this is just for info
void handle_destroynotify(XEvent *ev)
{
	reset_cache_inplay();
	reset_cache_client();
	Window win = ev->xdestroywindow.window;
	int idx = winlist_find(windows, win);
	if (idx >= 0)
	{
		wincache *cache = windows->data[idx];
		if (cache->title) textbox_free(cache->title);
		if (cache->frame) box_free(cache->frame);
		winundo *next, *undo = cache->undo;
		while (undo) { next = undo->next; free(undo); undo = next; }
		free(cache->ewmh);
	}
	winlist_forget(windows, win);
	winlist_forget(windows_activated, win);
}
void handle_destroynotify ( XEvent * ev ) { reset_cache_inplay ( ) ; reset_cache_client ( ) ; Window win = ev -> xdestroywindow . window ; int idx = winlist_find ( windows , win ) ; if ( idx >= 0 ) { wincache * cache = windows -> data [ idx ] ; if ( cache -> title ) textbox_free ( cache -> title ) ; if ( cache -> frame ) box_free ( cache -> frame ) ; winundo * next , * undo = cache -> undo ; while ( undo ) { next = undo -> next ; free ( undo ) ; undo = next ; } free ( cache -> ewmh ) ; } winlist_forget ( windows , win ) ; winlist_forget ( windows_activated , win ) ; }
we don't track window state internally much, so this is just for info
we don ' t track window state internally much so this is just for info
// remove any cached data on a window // destroy titlebar/borders // free undo chain