Fixes the xcb/X11-error of the EventRecorder script playback on Ubuntu

Now the playback of prerecorded scripts works fine on Ubuntu as well (there was some xcb-error before due to conflicts with different threads probably accessing the same Gui-elements).

I hope it also fixes the sporadic segfaults within the same action - I didn't notice any after fixing this xcb stuff.