Fix crash on Windows when closing Window
#80142
Merged
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.
resolve #80134
regression from #67791
conflict with #73239
WINDOW_EVENT_MOUSE_EXIT
when a window is destroyed.This fix had been included in #67791 for some time to fix comment #67791 (comment), but unfortunately (I apologize) got lost because I have developed the PR on two different computers.
This fix alone however no longer works in current master, because it conflicts with #73239.
event_callback
is still valid during destroying theWindow
.#73239 cleared the
event_callback
before callingDisplayServer::delete_sub_window
.However on Windows it becomes necessary, that this callback is still valid while the
Window
is destroyed.#73239 had the goal of closing issue #72707, which is linuxbsd-specific.
In this PR I move the changes of #73239 from
Window
toDisplayServerX11
, so that on linuxbsd #72707 should not be reintroduced. I can't test #72707, because I don't have the specific Window-manager i3wm installed. @bruvzg Since that PR was from you, may I ask you, if you consider this change valid?