Find the window that is accepting keyboard input, if any ! @post `result: result != nullptr` (but may point to an empty WindowPlacement) */
| 385 | @post `result: result != nullptr` (but may point to an empty WindowPlacement) |
| 386 | */ |
| 387 | inline std::unique_ptr<WindowPlacement> FindFocus() |
| 388 | { |
| 389 | if (auto p = Get()) |
| 390 | if (auto result = p->DoFindFocus()) |
| 391 | return result; |
| 392 | return std::make_unique<WindowPlacement>(); |
| 393 | } |
| 394 | |
| 395 | //! Set the window that accepts keyboard input |
| 396 | inline void SetFocus(const WindowPlacement &focus) |