The first answer to your questions is yes, there is somebody who knows about this.  Thanks for the bug report; I will get onto it.

        The simplest reason the bug never showed up in GLUT is that GLUT uses system-dependent menus that bear no resemblance to windows (or to each other between Linux and Windows systems).  I think your suggestion about checking "is_menu" is good.

John F. Fay
Technical Fellow, Jacobs/Sverdrup TEAS Group
-----Original Message-----
From: [] On Behalf Of Johannes Falk

Sent: Tuesday, June 27, 2006 5:03 PM
Subject: [Freeglut-bugs] glutGetWindow() returns windowID of current menu instead of current window


glutGetWindow() does sometimes not behave as expected. I frequently call
glutGetWindow() in my application to stay in sync with the current windowID. But sometimes I receive unexpected IDs, never got before by glutCreateWindow().

In the debugger I found that it unconditionally returns the fgStructure.window->ID, which sometime happens to be none of my windows, but one of the internally created windows for use of my menus.

I think this is a flaw that should be fixed somehow by the use of the "is_menu" flag. Is there anyone who knows about this?

I had my application running for years under HP-UX 11.11 using some old but original GLUT where that never happend.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Freeglut-bugs mailing list