Skip to content

Commit fd6138e

Browse files
committed
Fixes window_id being erased when emulating mouse events from touch events
1 parent 4631a61 commit fd6138e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/input/input.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
690690
button_event->set_canceled(st->is_canceled());
691691
button_event->set_button_index(MouseButton::LEFT);
692692
button_event->set_double_click(st->is_double_tap());
693+
button_event->set_window_id(st->get_window_id());
693694

694695
BitField<MouseButtonMask> ev_bm = mouse_button_mask;
695696
if (st->is_pressed()) {
@@ -727,6 +728,7 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
727728
motion_event->set_velocity(sd->get_velocity());
728729
motion_event->set_screen_velocity(sd->get_screen_velocity());
729730
motion_event->set_button_mask(mouse_button_mask);
731+
motion_event->set_window_id(sd->get_window_id());
730732

731733
_parse_input_event_impl(motion_event, true);
732734
}

0 commit comments

Comments
 (0)