Merge pull request #14753 from NathanWarden/mouse_button_fix

Fixed a bug where mouse button focus breaks when using multiple buttons at once.
This commit is contained in:
Noshyaar 2017-12-25 08:33:42 +07:00 committed by GitHub
commit 1348b087e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1640,7 +1640,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (mb->is_pressed()) {
Size2 pos = mpos;
if (gui.mouse_focus && mb->get_button_index() != gui.mouse_focus_button) {
if (gui.mouse_focus && mb->get_button_index() != gui.mouse_focus_button && mb->get_button_index() == BUTTON_LEFT) {
//do not steal mouse focus and stuff