Fix crash when making a surface fullscreen with a popup open