Problem with subwindows....

I am making an application in which i require keyboard input in one window and display objects in another.
I am using GLUT.
I have created the keyboard window as a subwindow of the one, in which i’ll be rendering my objects.
The trouble is the subwindow is not displaying anything ie. it’s background colour is changing according to init() but its display callback has no effect.

In these instances, it is often useful to post some code so we can see exactly whats going on