XGrabPointer is now called from the correct thread context and it is made sure that we have keyboard focus when using DirectX.