From 6713ea1590e8b9a4d72f51449eac88d93cbcea3a Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 6 Feb 2024 16:30:02 +0100 Subject: [PATCH] Fix: Debugger crashes when detached in GDExtension Resolves #25. --- util/compat_window_wrapper.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util/compat_window_wrapper.cpp b/util/compat_window_wrapper.cpp index fa540f6..5993a8c 100644 --- a/util/compat_window_wrapper.cpp +++ b/util/compat_window_wrapper.cpp @@ -90,7 +90,8 @@ void CompatShortcutBin::_shortcut_input(const Ref &p_event) { if (Object::cast_to(p_event.ptr()) || Object::cast_to(p_event.ptr())) { // HACK: Propagate the window input to the editor main window to handle global shortcuts. - grandparent_window->push_input(p_event); + // ! This hack crashes the editor if used in GDExtension. Disabled for now. + // grandparent_window->push_input(p_event); if (grandparent_window->is_input_handled()) { get_viewport()->set_input_as_handled(); @@ -355,8 +356,9 @@ CompatWindowWrapper::CompatWindowWrapper() { add_child(window); window->hide(); - CompatShortcutBin *capturer = memnew(CompatShortcutBin); - window->add_child(capturer); + // ! CompatShortcutBin crashes the editor if used in GDExtension. Disabled for now. + // CompatShortcutBin *capturer = memnew(CompatShortcutBin); + // window->add_child(capturer); window_background = memnew(Panel); window_background->set_anchors_and_offsets_preset(PRESET_FULL_RECT);