diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-16 13:29:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-16 13:29:44 +0100 |
commit | 9079be9e83206d368e03e5237b24fed2535c866d (patch) | |
tree | 3c6aa100a25f0f77575dce4f4a7f913efe15771c /scene | |
parent | 6b7bed98f488d4d3d9b9105cca4b4908d2ca4369 (diff) | |
parent | f52da158d9421b1c3109b59ed99968d766875234 (diff) |
Merge pull request #14484 from Zylann/fix_mouse_focus_button_release
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.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index f5d7043a40..1666aa5415 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1811,7 +1811,8 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { _gui_call_input(gui.mouse_focus, mb); } - if (mb->get_button_index() == gui.mouse_focus_button) { + if (mb->get_button_mask() == 0) { + // Last mouse button was released gui.mouse_focus = NULL; gui.mouse_focus_button = -1; } |