I have two displays connected to my computer. When I move a window from SDL2 to my second display and the code calls the SDL_SetWindowPosition
function, the window automatically moves to my first display.
Is there a way to prevent this or move the window back to the display it was earlier?
Asked
Active
Viewed 453 times
1

user11914177
- 885
- 11
- 33
-
1This question has been answered [here](https://stackoverflow.com/questions/41745492/sdl2-how-to-position-a-window-on-a-second-monitor). – denormal Jan 04 '20 at 10:30
-
@denormal Well sort of... – user11914177 Jan 04 '20 at 11:15
1 Answers
2
So the important thing is to set the window position to SDL_WINDOWPOS_CENTERED_DISPLAY(n)
n specifies which window should be used.

user11914177
- 885
- 11
- 33