I have a simple method that gets called by pressing f11. It reads out the resolution of the monitor the window is currently displayed on and sets the window to that resolution.
It also sets Is Borderless to true and sets the position of the window to (0, 0) using Window.position.
Now to my problem:
The method works fine on my primary monitor, but since Window.position uses global coordinates (resolution of all monitors combined), (0, 0) always refers to the top left corner of my primary monitor.
Therefore whenever I try to use said method on another display, the resolution gets set correctly but the window is then put on my primary monitor.
Is there a way to set the window position using coordinates that only include the resolution of the monitor the window is currently on?
Or does anyone have an idea how I could work around that problem?
I’ve been thinking and using my google skills for the past 2-3 days but always gave up after a few hours and worked on something else.
Any solutions/ideas/suggestions are appreciated.
I use Windows 10, VS studio 2019 and my project is a Cross Platform Desktop Application project, meaning it uses openGL.