I've not used glut before, but it seems odd that a window would be receiving input messages if it didn't have focus. Are you sure this is something you need to do manually?
–
Mike StrobelAug 9 '10 at 20:40

Since these are not game development exclusive topics, this question belongs at Stack Overflow stackoverflow.com where you should get a much better response.
–
RicketAug 9 '10 at 20:41

Im using GetAsyncKeyState for input rather that glut.
–
SamAug 12 '10 at 14:53

On Windows, he may want to compare his window handle to both the active window and the foreground window, ensuring that both match. I vaguely recall a strange edge case in which the active window was not necessarily the foreground window. Or perhaps I've simply gone mad.
–
Mike StrobelAug 11 '10 at 16:29