| 201 | } |
| 202 | |
| 203 | void GDKWindow::CheckForWindowResize() |
| 204 | { |
| 205 | // Skip for minimized window (GetClientRect for minimized window returns 0) |
| 206 | if (_minimized) |
| 207 | return; |
| 208 | |
| 209 | ASSERT(HasHWND()); |
| 210 | |
| 211 | // Cache client size |
| 212 | RECT rect; |
| 213 | GetClientRect(_handle, &rect); |
| 214 | const int32 width = Math::Max(rect.right - rect.left, 0L); |
| 215 | const int32 height = Math::Max(rect.bottom - rect.top, 0L); |
| 216 | _clientSize = Float2(static_cast<float>(width), static_cast<float>(height)); |
| 217 | |
| 218 | // Check if window size has been changed |
| 219 | if (width > 0 && height > 0 && (_swapChain == nullptr || width != _swapChain->GetWidth() || height != _swapChain->GetHeight())) |
| 220 | { |
| 221 | OnResize(width, height); |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | void GDKWindow::UpdateCursor() const |
| 226 | { |