Just FYI, this is the matching patch in libXi to switch to cookie events. Note the majority of the patch is moving the XGE handling into a new function and the resulting indentation changes.