summaryrefslogtreecommitdiffstats
path: root/core/input
diff options
context:
space:
mode:
authoralexkar598 <25136265+alexkar598@users.noreply.github.com>2024-10-18 15:37:39 -0400
committeralexkar598 <25136265+alexkar598@users.noreply.github.com>2024-10-18 15:37:39 -0400
commitfd6138ed7efaab4a00d6931a714563eb1bdddee0 (patch)
tree82dd219ad91e3f14af2cb154447a12b58b33ef31 /core/input
parent4631a617e5ab4ec5cc51dbc43609b269a43059d9 (diff)
downloadredot-engine-fd6138ed7efaab4a00d6931a714563eb1bdddee0.tar.gz
Fixes window_id being erased when emulating mouse events from touch events
Diffstat (limited to 'core/input')
-rw-r--r--core/input/input.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp
index eba7ded267..6261a435fa 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -690,6 +690,7 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &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<MouseButtonMask> ev_bm = mouse_button_mask;
if (st->is_pressed()) {
@@ -727,6 +728,7 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &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);
}