Hi! I recently started working with SFML, and I must say I enjoy it very much^^
When I split off event handling in my project into a separate thread,
all sorts of weird would happen, from bad X request errors to hanging in a window.clear() call.
This patch fixes those issues, but I was wondering if I should even create a pull request for this,
as it seems the relevant parts will soon be replaced by xcb anyway?