winex11: Move X11 locking inside the cursor creation functions.