浏览代码

Revert "Fix mouse button release not sent to gui_input if it's different from the button that gave focus"

Juan Linietsky 7 年之前
父节点
当前提交
1b944cb663
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scene/main/viewport.cpp

+ 1 - 2
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;
 			}