Minimized full screen

second attempt to post, hope this works…
my problem is that the SDL full screen goes minimized
when a DOS window appears.
I need to re-focus and maximize my SDL window,
so the questions are:

  1. can I know if my SDL window is minimized?
  2. is there a command to re-maximize it?

thanks for your help

  1. can I know if my SDL window is minimized?

The window manager will tell your application when it loose or gain
focus, you can trap it as an event.

Take a look at this here:
And more specifically:

  1. is there a command to re-maximize it?

As for this, well, I think it can be in your power, but is it something
you want to give to your users? If I personally decide to minimize the
application (without clicking a button in your application) will the
application refocus itself (disobeying my request to minimize it)?

I would not touch that, but rather stop the execution of the program if
it doesn’t have focus.

Also, if the DOS window that pops up is done by your program, then you
might consider an alternative that does not use a dos window, while if
any other window pops up you might want to let the user decide which is
most important (your prog or the other one).

As for the trick to refocus the window, I’m not sure if SDL has done
anything for it, but you might need to do an API call (include
<windows.h>) and loose a bit of compatibility with other OSes. But I
don’t know the name of the function, try googling these keywords: “force
focus window api” (and unfortunately the solution might: not work for
all windowses and some might require .net, etc, etc…)

Personally, I leave all that to the user and wash my hands! :wink: