Skip to content

Commit

Permalink
Merge pull request #68019 from Sauermann/fix-physics-mouseover-drop
Browse files Browse the repository at this point in the history
Drop physics mouseover as soon as the mouse moves over a Control
  • Loading branch information
akien-mga committed Nov 14, 2022
2 parents 2f573f2 + 5cf6ebc commit 40163b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 40163b9

Please sign in to comment.