diff options
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 ea8adc58cd..2f75ff7936 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1800,7 +1800,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; } |