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
I am here to report an issue and not to just ask a question or look for help (use the forum or Discord instead)
Describe your issue here
The window event sf::Event::Closed never get triggered when creating a window with sf::Style::None, sf::Style::Titlebar, sf::Style::Resize.
Most distros come with a hotkey to close the in-focus window. These hotkeys should allow you to trigger a window close event, but with SFML one never occurs. I tested both GLFW and SDL2 for the same behavior, they both behave as one would expect (the close event is propagated / the window closes).
I initially thought it was styles without a close button on the decorations, but sf::Style::Fullscreen works.
Your Environment
- OS: I tested against Linux Mint 23.1 Cinnamon x11. KDE was also tested by Flareon on Discord. I didn't test against Wayland.
Make sure hotkey is bound which closes in-focus window, compile / run this code, press hotkey -- the window will not get sf::Event::Close, the window will never close.
#include<SFML/Window.hpp>intmain()
{
sf::Window window; // also happens with RenderWindow// The following are all not working: Titlebar, Resize, None
window.create(sf::VideoMode({800, 600}), "My window", sf::Style::None);
while (window.isOpen()) {
sf::Event event{};
while (window.pollEvent(event)) {
// sf::Event::Closed is never given to us from window.pollEvent(event)if (event.type == sf::Event::Closed)
window.close();
}
window.display();
}
return0;
}
Expected behavior
The event sf::Close should be given via pollEvent when the user attempts to quit (such as by pressing hotkeys).
Actual behavior
The event sf::Close is never triggered
The text was updated successfully, but these errors were encountered:
Prerequisite Checklist
Describe your issue here
The window event sf::Event::Closed never get triggered when creating a window with sf::Style::None, sf::Style::Titlebar, sf::Style::Resize.
Most distros come with a hotkey to close the in-focus window. These hotkeys should allow you to trigger a window close event, but with SFML one never occurs. I tested both GLFW and SDL2 for the same behavior, they both behave as one would expect (the close event is propagated / the window closes).
I initially thought it was styles without a close button on the decorations, but sf::Style::Fullscreen works.
Your Environment
- OS: I tested against Linux Mint 23.1 Cinnamon x11. KDE was also tested by Flareon on Discord. I didn't test against Wayland.
- SFML version: Latest master, 30fcb35
- Compiler / toolchain: GCC 13.1
Steps to reproduce
Make sure hotkey is bound which closes in-focus window, compile / run this code, press hotkey -- the window will not get sf::Event::Close, the window will never close.
Expected behavior
The event sf::Close should be given via pollEvent when the user attempts to quit (such as by pressing hotkeys).
Actual behavior
The event sf::Close is never triggered
The text was updated successfully, but these errors were encountered: