diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-12-16 19:50:32 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-16 19:50:32 -0300 |
commit | 1b944cb663628ac153111423104bb52e111bd797 (patch) | |
tree | 527cf33105f2080caa9b1448f0a5362210538316 | |
parent | 652c98a7beb8fc8a8aad5075a673caf21994a2ba (diff) |
Revert "Fix mouse button release not sent to gui_input if it's different from the button that gave focus"
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 1666aa5415..f5d7043a40 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1811,8 +1811,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> 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; } |