diff options
Diffstat (limited to 'src/win.c')
-rw-r--r-- | src/win.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -739,7 +739,8 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam) handleConfigure(view, &event); break; case WM_SIZING: - if (view->sizeHints[PUGL_MIN_ASPECT].width) { + if (puglIsValidSize(view->sizeHints[PUGL_MIN_ASPECT]) && + puglIsValidSize(view->sizeHints[PUGL_MAX_ASPECT])) { constrainAspect(view, (RECT*)lParam, wParam); return TRUE; } @@ -771,8 +772,7 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam) mmi = (MINMAXINFO*)lParam; mmi->ptMinTrackSize.x = view->sizeHints[PUGL_MIN_SIZE].width; mmi->ptMinTrackSize.y = view->sizeHints[PUGL_MIN_SIZE].height; - if (view->sizeHints[PUGL_MAX_SIZE].width && - view->sizeHints[PUGL_MAX_SIZE].height) { + if (puglIsValidSize(view->sizeHints[PUGL_MAX_SIZE])) { mmi->ptMaxTrackSize.x = view->sizeHints[PUGL_MAX_SIZE].width; mmi->ptMaxTrackSize.y = view->sizeHints[PUGL_MAX_SIZE].height; } |