| 296 | } |
| 297 | |
| 298 | void Overlay::UpdateTargetOrder(bool topmost) |
| 299 | { |
| 300 | if (!pWindow) return; |
| 301 | |
| 302 | if (pWindow->Standard()) { |
| 303 | // if we are a independent overlay (which is a standard) window, don't do reordering |
| 304 | return; |
| 305 | } |
| 306 | |
| 307 | if (pWindow->Fullscreen()) { |
| 308 | // if we are a fullscreen attached overlay, always stay on top |
| 309 | // TODO: examine how topmost is set on SOTTR with logging to improve this fullscreen kludge |
| 310 | pWindow->SetTopmost(); |
| 311 | } |
| 312 | else { |
| 313 | if (topmost) { |
| 314 | // this function called with topmost=true when a window activation happens |
| 315 | // and the activated window is the target, so we need topmost to get on top |
| 316 | // of it |
| 317 | pWindow->SetTopmost(); |
| 318 | } |
| 319 | else { |
| 320 | // if other window was activated, we need to stop being topmost and insert |
| 321 | // ourself just above the target in the window order |
| 322 | pWindow->ClearTopmost(); |
| 323 | pWindow->Reorder(proc.hWnd); |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | Vec2I Overlay::CalculateOverlayPosition_() const |
| 329 | { |
no test coverage detected