There is somewhere that WINDOW_HIDDEN is getting set when it shouldn't