seems to correct lack of focus when coming back from being hidden. not strictly correct in multithreaded programs but let's see if anything breaks.