core: fix fullscreen/resize (fixes #262)