We recently started testing one of our products on Vista 64. We encountered a problem I was unable to completely solve.
Our OpenGL preview window is a child of the main application’s window. It has WS_CLIPCHILDREN and WS_CLIPSIBLINGS set. It gets re-drawn constantly because this is a real-time video application. Normally, the preview window is smaller than the main window and has various buttons around it.
We also have a mode where we re-size the preview window to fill the screen. Here’s where the problem occurs. We noticed that all the buttons and windows that should be on top of the preview window had disappeared.
It appears Vista (or the OpenGL driver) detects that the window is now full-screen and enables “game mode” for us. Our OpenGL window then draws over all of its sibling windows. We do not make any API calls to enable this mode and certainly don’t want it (since it breaks our application). We also occasionally put up progress dialogs and such, and those get obliterated, too.
I tried a number of things to avoid this “optimization” like setting PFD_SUPPORT_GDI or PFD_SUPPORT_OVERLAY, enabling/disabling Aero, opening a POPUP window above the app in the Z-order, etc. I was only able to work around it by sizing the preview window one pixel shy of the bottom of the screen.
I first realized what was happening because our app would return to normal when other applications’ windows were on top of ours, or the Alt-Tab window was open. There’s also a brief flash to black when it enters or exits the optimized mode.
This happened using an nVidia Quadro FX 4600 w/169.96 drivers.
I did some serious internet searching and couldn’t find any references to this issue. So, has anyone encountered this and/or know a way to turn off this undesired “performance enhancement” being forced on us?