I'm a beginner in C++ and SFML for game creation under linux(Pop!_OS 22.04 LTS). I tested the code on the official SFML website, everything seems to work but the title bar doesn't display; it's the same with other codes. I need your help, please. Here is an example of a code I tested:
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Titlebar);
sf::Event ev;
while(window.isOpen()){
while(window.pollEvent(ev)){
switch(ev.type){
case sf::Event::Closed:
window.close();
break;
case sf::Event::KeyPressed:
if(ev.key.code == sf::Keyboard::Escape){
window.close();
break;
}
default:
break;
}
}
//Render
window.clear(sf::Color::Blue);
window.display();
}
return 0;
}