Moved the setIdleCommand into window instead of uielement.