X11 window changed if to assert