I'm trying to create two windows on two displays. But I have a problem: the second window is displayed in full screen mode, but the first window is minimized, and I need to click on it on the taskbar to expand to full screen.
I create windows in loop with code:
windows_data.window = SDL_CreateWindow("Title", SDL_WINDOWPOS_CENTERED_DISPLAY(i),
SDL_WINDOWPOS_CENTERED_DISPLAY(i), width, height, SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_SHOWN);
Adding the flag SDL_WINDOW_MAXIMIZED does not solve the problem.
My system is Windows 8.1 Proffesional.
I debug step by step and found the reason in SDL_video.c::SDL_OnWindowFocusLost(SDL_Window * window)
So the problem is here "if (ShouldMinimizeOnFocusLoss(window))".
To solve the problem, I add the following code before creating the window: