| 117 | } |
| 118 | |
| 119 | HWND MessageInput::get_active_hwnd() |
| 120 | { |
| 121 | HWND root = GetAncestor(hwnd_, GA_ROOTOWNER); |
| 122 | if (!root) { |
| 123 | LogWarn << "GetAncestor returned nullptr, hwnd_ may be invalid" << VAR(hwnd_); |
| 124 | return hwnd_; |
| 125 | } |
| 126 | HWND popup = GetLastActivePopup(root); |
| 127 | if (popup && popup != hwnd_ && IsWindowVisible(popup)) { |
| 128 | return popup; |
| 129 | } |
| 130 | return hwnd_; |
| 131 | } |
| 132 | |
| 133 | LPARAM MessageInput::make_mouse_lparam(HWND target, int x, int y) |
| 134 | { |
nothing calls this directly
no outgoing calls
no test coverage detected