From fd6138ed7efaab4a00d6931a714563eb1bdddee0 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:37:39 -0400 Subject: [PATCH] Fixes window_id being erased when emulating mouse events from touch events --- core/input/input.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/input/input.cpp b/core/input/input.cpp index eba7ded267b..6261a435fa5 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -690,6 +690,7 @@ void Input::_parse_input_event_impl(const Ref &p_event, bool p_is_em button_event->set_canceled(st->is_canceled()); button_event->set_button_index(MouseButton::LEFT); button_event->set_double_click(st->is_double_tap()); + button_event->set_window_id(st->get_window_id()); BitField ev_bm = mouse_button_mask; if (st->is_pressed()) { @@ -727,6 +728,7 @@ void Input::_parse_input_event_impl(const Ref &p_event, bool p_is_em motion_event->set_velocity(sd->get_velocity()); motion_event->set_screen_velocity(sd->get_screen_velocity()); motion_event->set_button_mask(mouse_button_mask); + motion_event->set_window_id(sd->get_window_id()); _parse_input_event_impl(motion_event, true); }