More robust fullscreen toggling.

Don't assume fullscreen mode toggle action is in sync
with the real window state.