Reinstate a cleaned-up version of the old xwin_toggle_fullscreen - I indeed can't get it working reliably with all window managers without creating a new window. Move remaining non-window dependant code into ui_init/ui_deinit so that xwin_toggle_fullscreen can do ui_destroy_window/ui_create_window.