Close the X display last, to avoid a segfault x11/DesktopWindowLinux

Reviewed by Hugo Parente Lima