[PATCH v5 05/13] winex11: Introduce a new handle_state_change helper.