I searched the internet before about this issue and my understanding is, that SFML can not use multiple monitors and uses only the primary display.
Is this wrong?
So my expectation was that I get a window size of 2560x1440 from the getDesktopMode() function. That is also my native desktop resolution of my first screen.
But it gave me a window size of 4480x1440.
xrandr tool shows this screen as primary, just to be sure here the output:
Screen 0: minimum 8 x 8, current 4480 x 1440, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+2560+180 (normal left inverted right x axis y axis) 544mm x 303mm
1920x1080 60.00*+ 59.94 50.00 60.05 60.00 50.04
1680x1050 59.95
1600x900 60.00
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94 50.00
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 59.95*+
1920x1080 60.00 59.94 50.00
1680x1050 59.95
1440x900 59.89
1440x576 50.00
1440x480 59.94
1280x1024 75.02 60.02
1280x960 60.00
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-1 disconnected (normal left inverted right x axis y axis)
My knowledge about X11 programming is very limited, but my understanding of the line
int screen = DefaultScreen(display);
is that it reports the primary screen and so I would expect only screen resolutions of this screen from getDesktopMode()/getFullscreenModes()
I looked at the source code of the xrandr tool and modified the SFML code as far as I understand the xrandr tool what is does to find the screen resolutions.
I just say that my expectation is that the getDesktopMode() function should return the native resolution of my primary screen and never a window size that covers multiple monitors.
Maybe I am wrong with my expectation?