add: WMFreeBag(scr->selected_windows); scr->selected_windows = NULL;
context: wUnselectWindows(WScreen *scr){    WWindow *wwin;        while (scr->selected_windows) {	wwin = scr->selected_windows->head;        if (wwin->flags.miniaturized && wwin->icon && wwin->icon->selected)            wIconSelect(wwin->icon);	wSelectWindow(wwin, False);    }}