mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
Fixes window_id being erased when emulating mouse events from touch events
This commit is contained in:
parent
4631a617e5
commit
fd6138ed7e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user