I am using SFML 2.3.2 (the one from the repository of Ubuntu 16.04). As for my window manager, the file
/etc/X11/default-display-manager contains
/usr/sbin/gdm3The code that I was explaining was minimal in the sense that when testing the size of the window right after generating it, I got a height of 715 instead of 766.
Here is a simple code reproducing the bug. The bug does not occur every time. I have two kind of displays, as shown in the attachment, one with a translated rectangle and the other with the normal white rectangle (there seems to be some kind of other bug but this is not the point here).
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
int main() {
sf::ContextSettings context(24, 8, 4, 3, 0);
sf::RenderWindow window(sf::VideoMode::getFullscreenModes().front(), "OpenGL", sf::Style::Fullscreen, context);
sf::RectangleShape test(sf::Vector2f(200, 20));
test.setFillColor(sf::Color::White);
test.setPosition(sf::Vector2f(0,0));
while (true) {
window.draw(test);
window.display();
}
return 0;
}
I am now using some kind of workaround: as my problem only appears sometimes, I just have to recreate the window until it is as I want it to be. This does not really solve the problem though.
sf::RenderWindow window;
for (size_t i = 0; i < 20; i++) {
window.create(sf::VideoMode::getFullscreenModes().front(), "OpenGL", sf::Style::Fullscreen, context);
if (window.getSize().y == sf::VideoMode::getFullscreenModes().front().height)
break;
}