Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Choose monitor  (Read 1594 times)

0 Members and 1 Guest are viewing this topic.

Yoha

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Email
Choose monitor
« on: September 02, 2014, 04:36:46 pm »
Hello. I have not posted here in years, but I'm glad to see that my account is still accessible! This time, my Google-fu won't do, so I have to make a question on my own.

Consider a set-up with two different monitors:

$ xrandr
...
// secondary
   1360x768      60.02*+
   1920x1080     60.00    59.94    50.00    29.97    25.00    23.97    60.05    60.00    50.04
...
// primary
   1920x1080     60.00*+
...
 

sf::VideoMode::getFullscreenModes() returns:

3280×1080 32
1920×1080 32
...

Notice that 3280 = 1920 + 1360 is the total width of the desktop (additional question: how to detect these pseudo-modes?). The following lines are video modes for the secondary monitor. Subsequently, when using 1920x1080, the primary monitor is switched off and the resolution of the secondary is changed. SFML does not support dual fullscreen but…

Q: Is there a way to force SFML to use the primary monitor?

Edit: it might be the fault of xrandr which does not actually set the correct monitor as primary, even with --primary ; it might be useful to have a way to select a monitor through SFML but I am not sure it would be worth it before multiple monitors are supported.

Edit 2: this is apparently due to a bug in XFCE. The additional question remains:

Q: Can we distinguish video modes spanned over several monitors?
« Last Edit: September 02, 2014, 05:09:27 pm by Yoha »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Choose monitor
« Reply #1 on: September 02, 2014, 05:14:18 pm »
Quote
Q: Can we distinguish video modes spanned over several monitors?

Short answer: No.

Long answer: SFML does not properly support multiple monitor setups at all, this has been something that has long been wanted and long been planned to implement.

https://github.com/SFML/SFML/issues/188
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Yoha

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Email
Re: Choose monitor
« Reply #2 on: September 02, 2014, 06:01:12 pm »
Thanks for the clarification. For those interested, gnome-shell is as broken as xfce is when it comes to handling monitors.

 

anything