make X Win logic work