From 1b944cb663628ac153111423104bb52e111bd797 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 16 Dec 2017 19:50:32 -0300 Subject: [PATCH] Revert "Fix mouse button release not sent to gui_input if it's different from the button that gave focus" --- scene/main/viewport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 1666aa54152..f5d7043a403 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1811,8 +1811,7 @@ void Viewport::_gui_input_event(Ref p_event) { _gui_call_input(gui.mouse_focus, mb); } - if (mb->get_button_mask() == 0) { - // Last mouse button was released + if (mb->get_button_index() == gui.mouse_focus_button) { gui.mouse_focus = NULL; gui.mouse_focus_button = -1; }