query_yn update

Fixes #3963 and some similar issues with incomplete redrawing of window's borders.