X11 fixed minimize function