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); }