| 5010 | } |
| 5011 | |
| 5012 | void WindowsSystem::SetFocusOnWindow() |
| 5013 | { |
| 5014 | HWND btWindow = winOS->GetWindowsHandle(); |
| 5015 | |
| 5016 | // workaround as SetFocus only works from the |
| 5017 | // active process |
| 5018 | DWORD fgTid = GetWindowThreadProcessId(GetForegroundWindow(), 0); |
| 5019 | DWORD btTid = GetWindowThreadProcessId(btWindow, 0); |
| 5020 | if (btTid != fgTid) |
| 5021 | AttachThreadInput(btTid, fgTid, TRUE); |
| 5022 | |
| 5023 | SetFocus(btWindow); |
| 5024 | |
| 5025 | // unattach |
| 5026 | if (btTid != fgTid) |
| 5027 | AttachThreadInput(btTid, fgTid, FALSE); |
| 5028 | } |
| 5029 | |
| 5030 | void WindowsSystem::ResizeWindow() |
| 5031 | { |
no test coverage detected