Working window creation on X11 and Win32