I'm also not in favor of this solution and I've actually been thinking about passing over the EGLconfig. In the end I decided not to pass it over since the X11 Events system could also be used for GLX which wouldn't be aware of X11.