summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-12-16 19:50:57 -0300
committerGitHub <noreply@github.com>2017-12-16 19:50:57 -0300
commit83291eab3ae8940cc9da159774a1da6575196c89 (patch)
tree527cf33105f2080caa9b1448f0a5362210538316 /scene
parent652c98a7beb8fc8a8aad5075a673caf21994a2ba (diff)
parent1b944cb663628ac153111423104bb52e111bd797 (diff)
Merge pull request #14756 from godotengine/revert-14484-fix_mouse_focus_button_release
Revert "Fix mouse button release not sent to gui_input if it's different from the button that gave focus"
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp3
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;
}