Hi there.
Upon testing my game on Linux, as it has no menu yet, the only way to close it is using Alt-F4.
This method works perfectly fine on Windows with both fullscreen and windowed mode..
.. But on Linux, it only works in windowed mode. With fullscreen mode, Alt-F4 won't send the sf::Event::Closed event, and Alt-Tab won't change the window's focus.
I've tested this on Archlinux with GNOME 3, GNOME Classic, and XFCE.
I'm using SFML from latest git.
Here's some example code:
#include <SFML/OpenGL.hpp>
#include <SFML/Window.hpp>
int main()
{
sf::Window window{sf::VideoMode::getDesktopMode(), "Whee", sf::Style::Fullscreen};
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
switch(event.type)
{
case sf::Event::Closed:
window.close();
break;
default:
break;
}
}
glClear(GL_COLOR_BUFFER_BIT);
window.display();
}
return 0;
}
The OpenGL stuff (include, glClear and window.display()) is optional, but I put it in there so that you can clearly see the fullscreen window.
The only way for me to exit this program or return to my desktop is to switch to a different TTY and
pkill it.
Any help is appreciated.
Cheers.