From d083fb21c75fadfc36ffa81d91994dc6b82a7549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Sun, 13 Mar 2022 12:43:32 +0100 Subject: Drop mouse focus and over when gui input is globally disabled --- scene/main/viewport.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index de6aa2b139..87ad8bb1f8 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2768,6 +2768,14 @@ Vector2 Viewport::get_camera_rect_size() const { } void Viewport::set_disable_input(bool p_disable) { + if (p_disable == disable_input) { + return; + } + if (p_disable) { + _drop_mouse_focus(); + _drop_mouse_over(); + _gui_cancel_tooltip(); + } disable_input = p_disable; } -- cgit v1.2.3