Here’s the problem, I initialise my window as a normal window, then upon a certain keypress I call SDL_SetWindowFullscreen(fb.window, SDL_WINDOW_FULLSCREEN_DESKTOP);, which switches to fullscreen. Except it doesn’t work quite as it should. Here’s what it does:
-Flash both screens to black
-Set it to fullscreen on the main screen (as desired)
when I click on the secondary screen (where let’s say I have a web browser open):
-Flashes both screens to black again
-My SDL window disappears from the main screen (which it shouldn’t) and what is shown (the other programs in the background) has compositing issues, like GUI elements being black (apparently a normal Windows compositing bug related to having something in fullscreen)
when I switch back to my SDL program:
-Black flash again from switching to fullscreen (but not as bad as when you use true fullscreen)
-Compositing on the secondary screen is all screwed up and stays really screwed up until I switch back out of my SDL program
My point is this doesn’t behave like a true borderless window fullscreen mode in which the switch between programs is seamless. The way it currently works isn’t it, it’s some kind of fullscreen mode. So how can I obtain the desired behaviour? Not using SDL_SetWindowFullscreen() and instead using SDL_SetWindowResizable(), SDL_SetWindowBordered(), SDL_SetWindowPosition() and SDL_SetWindowSize() to the screen’s size give the same result, it seems that if you try to make a borderless window that is the size of the screen then it switches to a fullscreen mode even though that’s specifically what I don’t want.
I’m using OpenGL on Windows 7 with SDL 2.0.8.