Alt + tab issues (minimizing?)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
MolokoTheMole
Posts: 109
Joined: Tue Jan 09, 2007 1:18 pm

Alt + tab issues (minimizing?)

Post by MolokoTheMole »

Alt tabbing Irrlicht in fullscreen produces some weird behaviour, namely it switches to windowed mode but without a window, you are stuck with a rectangle in the top left corner of the screen. Alt tabbing again sometimes switches the resolution in fullscreen??

I would like to do this properly cause it is a critical issue especially in a multiplayer game were people constantly alt+tab to chat with somebody.

How could I fix it? The simplest would be to minimize the application but I don't know how to do it in Irrlicht.
Crimson Glory full Irrlicht game source code!
What I Do - my blog & dev log
Currently developing Link-Dead
Gtoknu
Posts: 9
Joined: Sat Sep 11, 2010 12:51 am

Post by Gtoknu »

Maybe if you tell the device to yield when the window is not active, this will not occur. Try it out :D
no_response
Posts: 26
Joined: Fri Aug 20, 2010 11:07 am
Location: Bulgaria

Post by no_response »

using win api

Code: Select all

ShowWindow(GetForegroundWindow(), SW_MINIMIZE);
if you need to make it minimize on alt+tab specificaly, just play around with

Code: Select all

GetAsyncKeyState() // http://msdn.microsoft.com/en-us/library/ms646293(VS.85).aspx
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can minimize and restore windows also via the Irrlicht API. The device has the necessary methods.
Post Reply