summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-10-29 16:23:27 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-11-14 12:07:26 +0100
commit5cf6ebce63cc7884d3270a5dbadd28b2b53c9019 (patch)
tree6b15bdba72bd8dac961dff378bb8d72804980455
parentb05e1e7d6982c1a0ebbba2e1da60bf05fd2a009a (diff)
Drop physics mouseover as soon as the mouse moves over a Control
-rw-r--r--scene/main/viewport.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 43a2c9473e..ddf9cac7dd 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1669,6 +1669,9 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
_gui_cancel_tooltip();
if (over) {
+ if (!gui.mouse_over) {
+ _drop_physics_mouseover();
+ }
_gui_call_notification(over, Control::NOTIFICATION_MOUSE_ENTER);
gui.mouse_over = over;
}
@@ -3039,8 +3042,6 @@ bool Viewport::gui_is_drag_successful() const {
}
void Viewport::set_input_as_handled() {
- _drop_physics_mouseover();
-
if (!handle_input_locally) {
ERR_FAIL_COND(!is_inside_tree());
Viewport *vp = this;