aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/mac.m')
-rw-r--r--src/mac.m13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mac.m b/src/mac.m
index d68816a..26048a8 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -1849,17 +1849,12 @@ puglSetSize(PuglView* const view, const unsigned width, const unsigned height)
PuglStatus
puglSetSizeHint(PuglView* const view,
const PuglSizeHint hint,
- const PuglSpan width,
- const PuglSpan height)
+ const unsigned width,
+ const unsigned height)
{
- if ((unsigned)hint >= PUGL_NUM_SIZE_HINTS) {
- return PUGL_BAD_PARAMETER;
- }
-
- view->sizeHints[hint].width = width;
- view->sizeHints[hint].height = height;
+ const PuglStatus st = puglStoreSizeHint(view, hint, width, height);
- return view->impl->window ? updateSizeHint(view, hint) : PUGL_SUCCESS;
+ return (!st && view->impl->window) ? updateSizeHint(view, hint) : st;
}
PuglStatus