[PATCH 1/7] winex11: Introduce a new handle_state_change helper.