Merge pull request #26 from limbonaut/debugger-crash-fix

Fix: Debugger crashes when detached in GDExtension
This commit is contained in:
Serhii Snitsaruk 2024-02-06 16:52:19 +01:00 committed by GitHub
commit 449538d6d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -90,7 +90,8 @@ void CompatShortcutBin::_shortcut_input(const Ref<InputEvent> &p_event) {
if (Object::cast_to<InputEventKey>(p_event.ptr()) || Object::cast_to<InputEventShortcut>(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);