Sign in to follow this  

Alt Tabbing in Vista

This topic is 3665 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've got a strange problem in Vista when in fullscreen mode and I alt/tab between my engine and other apps. When I come back to the engine, the game is displaced halfway down the screen. The top half of the screen has the currently set clear color. I'm not missing the top half, rather, the whole graphics window has moved down. I've run this on dozens of XP machines of all types and this problem has never happened. Does anyone have any idea what might be causing this with Vista? I have checked the projection matrix before and after the alt/tab back and forth and it's fine. I've checked a bunch of other things, including resetting glViewport, but have run out of ideas. My graphics card is a GeForce Go 7950 GTX with the latest driver. The engine runs at 1024 x 768 so I'm toggling resolutions when I detect loss and regain of focus (I've tried responding to ACTIVATE_APP as well, but it made no difference), but as I said, I don't see this problem anywhere else.

Share this post


Link to post
Share on other sites
Don't be so quick to blame the drivers, sometimes drivers have some code in them that hide bugs(They are more forgiving than the specs), when a later version of the driver, like the Vista ones comes out without these failsafe, the driver is not really the problem, it's the game that makes a mistake, but it worked anyway because of a hack in the driver.

I've seen it happen, every thing works fine on NVidia, then you realize that on ATI it doesn't, you debug and realize you actually do something wrong.

Share this post


Link to post
Share on other sites
That is a good point. But I think the approach here will be to try to run my app on other Vista machines and see what happens. And I'll also run some other OpenGL apps on the machine in question. I can't rule out my code just yet, but I can't rule out the driver either. This code has been running fine for several years on a large number of systems with very different card configurations. Second, the problem does not appear when running in DirectX mode, only OpenGL. Both modes use the same code to respond to the task switching. I know this isn't proof of anything, but it's definitely curious.

Share this post


Link to post
Share on other sites
I was able to remove the problem by doing a SetWindowPos after activation to move the graphics window to where it should be (0, 0, width, height). Somehow the window placement gets screwed up when alt-tabbing. There is no such code in my app that would do that, so I'll be looking into this further, but for now at least I don't get the problem.

Share this post


Link to post
Share on other sites

This topic is 3665 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this