From 7c9bd815782050194a2bd907ac94c167443991a2 Mon Sep 17 00:00:00 2001 From: EricEzaM Date: Sun, 25 Apr 2021 22:44:02 +1000 Subject: Fix viewport not updating mouse pos on click. Closes #47594. See further discussion there. Thanks to @Bhu1-V for the investigation which led to this fix. --- scene/main/viewport.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 4c9ebe016e..12db204386 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1830,6 +1830,7 @@ void Viewport::_gui_input_event(Ref p_event) { Control *over = nullptr; Point2 mpos = mb->get_position(); + gui.last_mouse_pos = mpos; if (mb->is_pressed()) { Size2 pos = mpos; if (gui.mouse_focus_mask) { -- cgit v1.2.3