I am using SFML (2.6.2) for macOS (15.2) on Xcode.
I face the problem that in ca. 8 out of 10 cases I get a duplicate (highly overlapping) window displayed.
I reduced my code to the below minimal code example that produces the problem:
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Test");
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed)
window.close();
}
window.clear(sf::Color::Black);
window.display();
}
return 0;
}
Can anyone help me to solve that problem?