| 697 | } |
| 698 | |
| 699 | void GetRelativeWindowOffset(WindowType type, SDLWindow* parentWindow, Int2& positionOffset) |
| 700 | { |
| 701 | if (!IsPopupWindow(type)) |
| 702 | return; |
| 703 | |
| 704 | SDLWindow* window = parentWindow; |
| 705 | while (window != nullptr) |
| 706 | { |
| 707 | Int2 parentPosition; |
| 708 | SDL_GetWindowPosition(window->GetSDLWindow(), &parentPosition.X, &parentPosition.Y); |
| 709 | positionOffset -= parentPosition; |
| 710 | |
| 711 | if (!IsPopupWindow(window->GetSettings().Type)) |
| 712 | break; |
| 713 | |
| 714 | window = window->GetSettings().Parent; |
| 715 | } |
| 716 | } |
| 717 | |
| 718 | Int2 GetSDLWindowScreenPosition(const SDLWindow* window) |
| 719 | { |
no test coverage detected