I've tracked the locking problem to two initialization events. Commented out seems to not break anything InitRootWindow function call MapWindow(pWin, serverClient); My current guess DefineInitialRootWindow function call (*pScreen->DisplayCursor) (pScreen, sprite.current);