SFML community forums

Help => Window => Topic started by: grok on January 13, 2015, 06:35:17 am

Title: Fullscreen mode is broken
Post by: grok on January 13, 2015, 06:35:17 am
Hi there. I use SFML 2.2.

I have an issue regarding fullscreen mode. Here's a test program:
#include <SFML/Graphics.hpp>
     
int main() {
    std::vector<sf::VideoMode> modes = sf::VideoMode::getFullscreenModes();
    sf::RenderWindow window(modes[0], "Test", sf::Style::Fullscreen);
           
    while (window.isOpen()) {
        sf::Event event;
        while (window.pollEvent(event)) {
            if (event.type == sf::Event::Closed) {
                window.close();
            }
        }

        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape)) {
            window.close();
        }
     
        window.clear(sf::Color::White);                  
        window.display();
    }

    return 0;
}
 

1) When I compile and execute it on my home PC (ubuntu 13.10 32bit, GeForce 7900 GS video card, NVidia driver version 304.117) it works correctly.

2) But when I compile and execute it on my Asus K56C notebook (ubuntu 14.04.1 64bit, built-in Intel video card and GeForce 635M, using GeForce card at that moment, NVidia drivers versison 331.113), it displays the white square on the leftmost topmost part of the screen (i.e. it occupies 1/4 part of the screen), leaving the rest of the screen being black.
After I press Escape, the program closes and it somehow resets my XFCE4 Desktop Environment (the issue the same: the desktop occupies only the 1/4 part of the screen, and I can work only in that area, the rest of the screen is black). What I mean is that I can no longer move my mouse along all my screen, it stucks in that area of the screen. It looks like as if my XFCE4 Desktop Environment was placed into the 1/4 area of the screen.
Something went wrong. To "fix" that I have to go to the XFCE4 Monitor settings and reset my screen resolution back to 1366x768 to fix that.

The game Zloxx II (http://www.bromeon.ch/games/zloxx/) misbehaves exactly in the same way.

The weird thing is that
Quote
glxgears -fullscreen
works as expected.

I thought maybe it is Nvidia bug, but nvidia-settings shows that Nvidia drivers are installed and it reports no problems.

If you need a screenshot of what's going on, I can post it later. Thank you.

UPD: Here're the photos:
1) XFCE4, running a terminal. We're ready to run the test SFML program:
https://www.dropbox.com/s/b4o33x9sdccbbbb/2015-01-13%2011.37.10.jpg?dl=0
2) running SFML program:
https://www.dropbox.com/s/mhze6wkvz6g77aa/2015-01-13%2011.37.25.jpg?dl=0
3) pressed an Escape, returned to the XFCE4 Desktop Environment, which is now got "broken":
https://www.dropbox.com/s/cazi39u9t4aiu3c/2015-01-13%2011.38.07.jpg?dl=0

In case the links above don't work I reposted the photos there:
1)
 (http://s58.radikal.ru/i162/1501/c6/28d0b25d5112.jpg)
2)
 (http://s018.radikal.ru/i502/1501/d5/b3ca1d6aef13.jpg)
3)
 (http://s018.radikal.ru/i522/1501/81/2fc9588c32d1.jpg)

TL;TR:
Chances are my issue is similar to the issue #436 (https://github.com/SFML/SFML/issues/436).

Should I file a bug report?
Title: AW: Fullscreen mode is broken
Post by: eXpl0it3r on January 13, 2015, 09:32:54 am
Did you actually use SFML 2.2 or did you build from Git master?
On Git master we've moved on to XCB, but it currently still has some fullscreen issues as well, but Tank is already working on it.

Can you try the master branch?
Title: Re: Fullscreen mode is broken
Post by: grok on January 13, 2015, 09:36:48 am
I use SFML 2.2 from the github repo, compiled it on both my computers (home PC and notebook) manually.
Built it maybe half a month ago or so. Yes, I will try the master branch and report back.

In other words I use SFML 2.2 from the first day it was officially released.
Title: Re: Fullscreen mode is broken
Post by: grok on January 13, 2015, 10:29:06 am
Okay, I just rebuilt SFML 2.2 (git pull, Cmake ..., make, sudo make install) and the problem persists.
SFML 2.2 having the latest commit at this moment: https://github.com/SFML/SFML/commit/c303d1f73ba5b99f7a360cc28630eee0936fd049
Title: Re: Fullscreen mode is broken
Post by: eXpl0it3r on January 13, 2015, 10:56:39 am
Okay. As I said, Tank is already working on it and should have some fixes very soon, just hang in there. ;)
Title: Re: Fullscreen mode is broken
Post by: grok on January 13, 2015, 11:40:23 am
I see.
I just wonder why nobody else has encountered this issue before, keeping in mind that it comes from (apparently?) SFML 2.2 or even an earlier version.

Thanks for your help, I'll be following the SFML updates. If you need more information regarding my environment/hardware/settings, just let me know.
Title: Re: Fullscreen mode is broken
Post by: eXpl0it3r on January 13, 2015, 02:33:53 pm
My guess would be that some might have noticed it, but didn't report it (properly) and the rest probably developed in window mode, which is usually easier to debug etc.
But that's just my guess.
Title: Re: Fullscreen mode is broken
Post by: Tank on January 13, 2015, 04:57:58 pm
https://github.com/SFML/SFML/pull/780
Title: Re: Fullscreen mode is broken
Post by: grok on January 13, 2015, 09:25:08 pm
Tank, great! your pull request fixed my issue. :)
Title: Re: Fullscreen mode is broken
Post by: Tank on January 13, 2015, 09:47:12 pm
Nice to hear, and thanks for reporting. :)
Title: Re: Fullscreen mode is broken
Post by: Wcubed on June 07, 2015, 11:53:37 pm
I have the exact same issue...
I am using SFML 2.3 on Ubuntu 15.04.

"glxgears -fullscreen" strangely leaves the title and application bars uncovered, this seems to be a bug with unity though.
Title: Re: Fullscreen mode is broken
Post by: eXpl0it3r on June 08, 2015, 12:27:12 am
Can you test: https://github.com/SFML/SFML/tree/2.3.x
Title: Re: Fullscreen mode is broken
Post by: Wcubed on June 08, 2015, 07:17:22 am
Thanks for replying so fast!

I compiled and installed the github release (uninstalled the old one of course) but the problem persists.
Title: AW: Fullscreen mode is broken
Post by: eXpl0it3r on June 08, 2015, 08:04:07 am
Did you try the master branch or the 2.3.x?
Title: Re: Fullscreen mode is broken
Post by: Wcubed on June 08, 2015, 08:38:18 am
I tried the 2.3.x, the one I tried earlier was the source on the download page http://www.sfml-dev.org/download/sfml/2.3/
Title: Re: Fullscreen mode is broken
Post by: ChrissAwesome on December 23, 2015, 01:03:52 am
Same problem here, builded the neweset stable version of sfml.

Im running sfml under lubuntu with gcc.

Title: Re: Fullscreen mode is broken
Post by: ChrissAwesome on December 23, 2015, 05:04:34 pm
Also tested the https://github.com/SFML/SFML/tree/2.3.x.

Still not working :/
Title: Re: Fullscreen mode is broken
Post by: Nixon on February 13, 2016, 12:01:51 am

Hello,

I have quite the same issue,

(http://img4.hostingpics.net/thumbs/mini_217505bug.jpg) (http://www.hostingpics.net/viewer.php?id=217505bug.jpg)

Minimal code to produce the bug :

int main(int, char const**) {

    RenderWindow w(VideoMode(1600, 900), "Test",sf::Style::Fullscreen);
    return EXIT_SUCCESS;
}

I use :
SFML 2.3.2  (do the same with 2.1)
g++-4.9
Kubuntu 14.04.3
Nvidia GeForce GT840M 2 Go
Driver : NVIDIA binary driver - 352.63 (recommended driver)

I hope it can help you and I'm ready to test updates if you need.
But I never used git ^^
I will try to build https://github.com/SFML/SFML/tree/2.3.x.