| 278 | } |
| 279 | |
| 280 | void Overlay::UpdateTargetRect(const RectI& newRect) |
| 281 | { |
| 282 | if (!pWindow) return; |
| 283 | |
| 284 | if (pWindow->Standard()) { |
| 285 | // if we are a independent overlay (which is a standard) window, don't move when target moves |
| 286 | return; |
| 287 | } |
| 288 | |
| 289 | if (targetRect != newRect) { |
| 290 | targetRect = newRect; |
| 291 | pWindow->Move(CalculateOverlayPosition_()); |
| 292 | } |
| 293 | // hide window during move, record timepoint to determine when to show again |
| 294 | pWindow->Hide(); |
| 295 | lastMoveTime = std::chrono::high_resolution_clock::now(); |
| 296 | } |
| 297 | |
| 298 | void Overlay::UpdateTargetOrder(bool topmost) |
| 299 | { |