summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-14 16:37:54 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-14 16:37:54 +0100
commit40163b9b9f6480a3ba7d99d0fc3277909dd1ff68 (patch)
tree5adc15880d8138b22a4a79a8bfc8faa2c21991c7 /scene/main
parent2f573f211ef821f293a0c9f1f0121d471215933d (diff)
parent5cf6ebce63cc7884d3270a5dbadd28b2b53c9019 (diff)
Merge pull request #68019 from Sauermann/fix-physics-mouseover-drop
Drop physics mouseover as soon as the mouse moves over a Control
Diffstat (limited to 'scene/main')
-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;