> So, my question is: how whould I catch such X errors? To answer this part myself, there's a debug channel doing this: WINEDEBUG=+synchronous This makes the connection to the X server synchronous and drops you into the debugger in case of a failure.