New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leaving full-screen on Linux deactivates second monitor #436
Comments
If another system/confirmation is wanted, I experience the same (similar?) issue. I create a SFML Window with sf::Style::Fullscreen, and my external (secondary) monitor is deactivated and the program runs full screen on my primary monitor. Monitor continues to stay deactivated after program termination. I must re-enable it with xrandr. This is on SFML 2.1 as well (2.1-1 to be exact? That is the version of the package at least.). Code: Out of curiosity, I ran the following code:
And got:
The resolution of my second monitor (1920x1080), nor the combined resolution, is not found, so that may be part of the issue(?). 'X -version' output:
Intel HD 3000 with version 9.2.2-1 of Mesa drivers. |
Hey, sorry for not replying to you guys. Can you elaborate on your used setup? I.e. how is the multihead setup configured? |
About as simple as can be, just two monitors, using a single X server, setup via xrandr. I'll get to you with more info later.... |
Any updates on this? |
Sorry, completely forgot about this! So, this is my system: Kernel: 3.16.1-1 Here's my test code: #include <SFML/Window.hpp>
int main()
{
sf::Window w(sf::VideoMode(800, 600), "My window", sf::Style::Fullscreen);
while(w.isOpen())
{
sf::Event event;
while(w.pollEvent(event))
{
if(event.type == sf::Event::Closed)
w.close();
if(event.type == sf::Event::KeyPressed)
if(event.key.code == sf::Keyboard::Escape)
w.close();
}
}
} Funny thing is though, whereas before my monitors would continue to stay deactivated after exiting the SFML program, my monitor now reactivates after exiting. Which, I think is intended behavior. That's how games on Windows work when you have Nvidia Surround setup (when you're not using the full surround). So unless, you set one X screen per monitor, I think it's actually working fine now. At least for me. I have a laptop with an Intel HD 3000 that I can test as well, I'll get back to this once I've tested that. |
It's been a while since this was originally reported, so maybe it was something to do with the underlying window system. I guess we can give this a bit more time, and if nobody else can confirm this is still an issue we can close it as resolved. |
Let's close this. If it happens again we can reopen this. |
I can confirm this bug with the latest version of SFML. I'm running Linux Mint Cinnamon 17.2 and basically if my fullscreen window crashes, the second monitor gets turned off completely and the resolution on my first one is reduced to a minimum. It's a very localized bug but you should still re-open the issue. Also I had sf::Style::Closed set as a window style so that may contribute. I'm not sure how to replicate the bug, but just try creating a fullscreen sf::Style::Closed window and then have it crash, that might be the culprit. |
So it only happens when it crashes? |
In my case yes, only when the window crashes. In my case the crash was the icon if that helps but I'm sure that's unrelated. Also, unlike a previous case the second monitor gets closed even after termination, in order to go back to normal I must enter settings, restore resolution and re-enable the second display. |
I'm still a bit confused. What happens if your fullscreen application closes normally? What happens if your fullscreen application crashes? What Window Manager do you use? Is your SFML version 2.3.1? |
If the game has no crashes, then it simply starts and behaves normally, covering one whole monitor in fullscreen state. If I close it after that, nothing happens to my monitors
One display gets disabled, the other one has its resolution lowered to around 800x600
MATE 1.10
Yes, installed from the official repository |
So... SFML is supposed to do something after it crashes? |
When leaving full-screen (either by closing the window or calling
create()
with a non-full-screen mode), the resolution of the primary monitor is correctly restored but the second one is left deactivated, even after logging out and in again. I have to manually reactivate it in System Settings -> Display and Monitors. (Relative) screen positions are also lost.This minimal program is enough to (always) reproduce the bug on my Kubuntu 13.04 system with two monitors (notebook monitor and external one set as primary) and SFML commit 6c1899d (aka 2.1):
The issue also appears when leaving the full-screen mode with
Window::create()
.(As a side note, the window is also created in the top-left corner of the primary screen instead of the center.)
Additional system information
ATI Mobility Radeon 5650 with open source drivers.
Output of
X -version
:I'm not an experienced Linux user but if you give me pointers, I would be happy to provide you with more relevant information.
The text was updated successfully, but these errors were encountered: