Browse Source

Do not consume (eat) mouse messages with no_focus Window's (Godot PopupMenu)

Window's with the no_focus flag should still process mouse events and not consume them. Otherwise all mouse pressed operations will not work inside Godot's PopupMenu.
This problem is Windows only, all other platforms do process mouse events for PopupMenu's correctly.

(cherry picked from commit 40d7320a17560222042661798baba150d30c2d91)
Marius Hanl 1 năm trước cách đây
mục cha
commit
cc9bb3bc3f
1 tập tin đã thay đổi với 1 bổ sung3 xóa
  1. 1 3
      platform/windows/display_server_windows.cpp

+ 1 - 3
platform/windows/display_server_windows.cpp

@@ -2958,9 +2958,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
 			}
 		} break;
 		case WM_MOUSEACTIVATE: {
-			if (windows[window_id].no_focus) {
-				return MA_NOACTIVATEANDEAT; // Do not activate, and discard mouse messages.
-			} else if (windows[window_id].is_popup) {
+			if (windows[window_id].no_focus || windows[window_id].is_popup) {
 				return MA_NOACTIVATE; // Do not activate, but process mouse messages.
 			}
 		} break;