Automatic focusing if the new window in x11

When I create a new window using x11 and XCreateSimpleWindow, I observe that the keyboard focus automatically goes onto this new window. Is there any method to prevent this auto-focusing ?