Sfml: Fullscreen does not go over task bars on top and left on Ubuntu 16.04

Created on 3 May 2017  路  10Comments  路  Source: SFML/SFML

Fullscreen does not go over task bars on top and left on Ubuntu 16.04, SFML 2.4.1.

YouTube's and other games' fullscreen modes work normally.

Here is a screenshot of it.
Here is the minimal code:

#include <SFML/Graphics.hpp>

int main (int argc, char* argv[]) {
    sf::RenderWindow window(sf::VideoMode(1920, 1080), "Window", sf::Style::Fullscreen);

    while (window.isOpen()) {
        sf::Event event;
        while (window.pollEvent(event)) {
            switch(event.type) {
                case sf::Event::Closed:
                    window.close();
                    break;
            }
        }

        window.clear();
        window.display();
    }

    return 0;
}
bug sfml-window linux accepted

Most helpful comment

This fixes the issue for me. Tested on Ubuntu 16.04.5 (Unity) in Virtualbox.

  • Using latest version on master (5e10e1f0c9b0a5c095df0f8e9be96914f75297d0), fullscreen takes up the entire monitor as expected.
  • I chose a build a few commits before the latest master (be3556d76ab956bab63d96b1d117546e6bf9897e) and was able to replicate the issue, fullscreen did not cover the top bar / side bar.

All 10 comments

Always thought this is the expected behavior on Unity, although I might be wrong. Only using Linux for occasional test builds, no full time user here.

YouTube's and other games' fullscreen modes work normally like in Windows though.

Okay, then this should probably be changed. By someone actually knowing X11 * shudder *. Any volunteers?

This is very critical for my game. Performance is very poor at windowed mode so fullscreen is a must. Can anyone help with this?

Tried and clearly too much X11/XRandR shenanigans going on for my likings. It seems like we'd have to use XRandR 1.2 and newer the way described here.

I just tested @bloodsword 's commit, it fixes the issue. Please add this.

Can anyone test master which includes the fix by @bloodsword?

This fixes the issue for me. Tested on Ubuntu 16.04.5 (Unity) in Virtualbox.

  • Using latest version on master (5e10e1f0c9b0a5c095df0f8e9be96914f75297d0), fullscreen takes up the entire monitor as expected.
  • I chose a build a few commits before the latest master (be3556d76ab956bab63d96b1d117546e6bf9897e) and was able to replicate the issue, fullscreen did not cover the top bar / side bar.

Same tested on Ubuntu 18. Greenlit.

Thanks, forgot to close it this after the merge. 馃檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AMDmi3 picture AMDmi3  路  5Comments

shayanaminnjad picture shayanaminnjad  路  8Comments

exitc0d3 picture exitc0d3  路  6Comments

Chringo picture Chringo  路  3Comments

eigenbom picture eigenbom  路  8Comments