[PATCH 2/3] winex11: Introduce a new handle_state_change helper.