delete window when resizing on Linux, fixes #2