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

Author Topic: Full screen pushes my other windows to my right monitor  (Read 2864 times)

0 Members and 1 Guest are viewing this topic.

Culinary

  • Newbie
  • *
  • Posts: 9
    • View Profile
Full screen pushes my other windows to my right monitor
« on: November 18, 2015, 04:41:19 pm »
When I go in fullscreen on my game:
Code: [Select]
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Fullscreen);

All of my windows get pushed to my right dual monitor. This is extremely annoying when I test in fullscreen
as a lot of my windows I like to be on my left monitor.

How do I stop this from happening? The game appears on the left monitor if that helps.

Windows 7
« Last Edit: November 18, 2015, 05:10:41 pm by Culinary »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Full screen pushes my other windows to my right monitor
« Reply #1 on: November 18, 2015, 06:00:31 pm »
Can you provide some more code? Do you use any custom WINAPI code in addition to SFML? Any desktop tools for Window alignment etc.? Just because one program goes fullscreen, this shouldn't move any other windows.

Culinary

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Full screen pushes my other windows to my right monitor
« Reply #2 on: November 18, 2015, 06:36:22 pm »
It's literally the default code from the tutorial.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Full screen pushes my other windows to my right monitor
« Reply #3 on: November 19, 2015, 06:19:21 pm »
This happens when the monitor resolution is changed. Since the entire desktop (including both screens) is treated as one giant display, when you change the left monitor's resolution, it changes how much of the desktop it can see, and therefore where the next one starts. This too, means that some windows on the left monitor may now be displayed on the right monitor.

When I go fullscreen (with a lower resolution), my (maximised) IDE gets pushed to the next monitor. I would say that this is expected behaviour.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Full screen pushes my other windows to my right monitor
« Reply #4 on: November 19, 2015, 09:19:45 pm »
Hm, yeah, sounds reasonable. So far I expected the other screens not to adjust resolution. Either way it's definitely something done by the OS and nothing we can (or should) change.

If you don't want that behavior, create a borderless window that fills the desktop without actually using fullscreen mode.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Full screen pushes my other windows to my right monitor
« Reply #5 on: November 20, 2015, 12:39:46 am »
If you don't want that behavior, create a borderless window that fills the desktop without actually using fullscreen mode.
Going into fullscreen mode at the same resolution should also avoid this but the window thing is a better way to go if possible.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything