Rewrite of toggle_fullscreen so it modifies the attributes of the existing window instead of creating a new one.