You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a fullscreen window with SFML in a Gnome Wayland session the window content is sometimes offset by what seems to be the height of the Gnome top bar. Maybe this is related to #1613?
Your environment
Arch Linux, Gnome 44.5
SFML 2.6.0
g++ 13.2.1
Steps to reproduce
Run this minimal example in a Gnome Wayland session until the issue appears (might take some tries, maybe appears more often when starting while a Firefox window is visible):
#include"SFML/Graphics.hpp"intmain() {
sf::RenderWindow Window(sf::VideoMode::getDesktopMode(), "Test", sf::Style::Fullscreen);
sf::Event Event;
while (Window.isOpen()) {
while (Window.pollEvent(Event)) {
if (Event.type == sf::Event::Closed)
Window.close();
}
Window.clear(sf::Color(255, 0, 0, 255));
Window.display();
}
return0;
}
Expected behavior
The window content fills the whole screen. In the above example, this means the whole screen is red. This is also what usually happens:
Actual behavior
Sometimes the window content is offset by what seems to be the height of the Gnome top bar and cut off by that amount at the bottom. The above example only shows the first part, the red does not start at the top of the screen but is offset by a grey bar:
The grey bar is part of the window as seen in the overview:
And as a comparison the desktop view showing the top bar:
The text was updated successfully, but these errors were encountered:
Rakksor
changed the title
Window content not centered in Gnome Wayland session
Window content sometimes not centered in Gnome Wayland session
Sep 25, 2023
Subject of the issue
When opening a fullscreen window with SFML in a Gnome Wayland session the window content is sometimes offset by what seems to be the height of the Gnome top bar. Maybe this is related to #1613?
Your environment
Steps to reproduce
Run this minimal example in a Gnome Wayland session until the issue appears (might take some tries, maybe appears more often when starting while a Firefox window is visible):
Expected behavior
The window content fills the whole screen. In the above example, this means the whole screen is red. This is also what usually happens:
Actual behavior
Sometimes the window content is offset by what seems to be the height of the Gnome top bar and cut off by that amount at the bottom. The above example only shows the first part, the red does not start at the top of the screen but is offset by a grey bar:
The grey bar is part of the window as seen in the overview:
And as a comparison the desktop view showing the top bar:
The text was updated successfully, but these errors were encountered: