UNSTABLE! Changing factory function for X11 window