Fix bug on x11 where window close events were not propagated with certain window styles #2947
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is intended to fix #2943.
It's a single line change which adds a flag for x11 telling it to propagate close events for styles None, Resize, Titlebar.
In truth I do not understand x11 very well, but the behavior / fix seems to make sense to me at least. It fixes the bug on my machine, and doesn't visually impact the window decorations.
I've only confirmed the initial bug on Cinnamon. Flareon from the Discord confirmed it was present on KDE.
I've only tested this PR Cinnamon.
How to test this PR?
Make sure hotkey is bound which closes in-focus window, compile / run this code, press hotkey
A) without this PR, the window will not get sf::Event::Close, the window will never close.
B) with this PR, the window will get sf::Event::Close, the window will successfully close.