The actual Gdk/X window will be created when the widget gets realized. You can get the Window ID with:
#include <gdk/gdkx.h> Window xwin = GDK_WINDOW_XWINDOW (GTK_WIDGET (my_window)->window);