Fix invalid window resizing after exit from fullscreen