diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-08-02 00:17:25 +0200 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-08-02 00:17:25 +0200 |
commit | 8c1ce404d7d96c7034018a37cbf4a8bcad6d7386 (patch) | |
tree | da25cc3c036526319403b8805897c2391211c8a4 /platform/linuxbsd/x11/display_server_x11.cpp | |
parent | 2992ffd25523cb8b3e0ef1b873c40115b8940178 (diff) | |
download | redot-engine-8c1ce404d7d96c7034018a37cbf4a8bcad6d7386.tar.gz |
Fix crash on Windows when closing `Window`
Send `WINDOW_EVENT_MOUSE_EXIT` when a window is destroyed.
Ensure, that on Windows, the event_callback is still valid during
destroying the `Window`.
Diffstat (limited to 'platform/linuxbsd/x11/display_server_x11.cpp')
-rw-r--r-- | platform/linuxbsd/x11/display_server_x11.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 7189a1c1c9..2643cd3b1a 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -1449,6 +1449,12 @@ void DisplayServerX11::delete_sub_window(WindowID p_id) { DEBUG_LOG_X11("delete_sub_window: %lu (%u) \n", wd.x11_window, p_id); + window_set_rect_changed_callback(Callable(), p_id); + window_set_window_event_callback(Callable(), p_id); + window_set_input_event_callback(Callable(), p_id); + window_set_input_text_callback(Callable(), p_id); + window_set_drop_files_callback(Callable(), p_id); + while (wd.transient_children.size()) { window_set_transient(*wd.transient_children.begin(), INVALID_WINDOW_ID); } |