diff options
author | David Robillard <d@drobilla.net> | 2025-01-22 18:42:13 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-01-22 18:42:13 -0500 |
commit | 44e65f78fca1597471d31a96907d5be465ca1ec1 (patch) | |
tree | 8c6394d767a0166fc7f69166b278f20a94dad454 /src/mac.m | |
parent | 8905c1176aa5099545fd9abb2e673efc136d0311 (diff) | |
download | pugl-44e65f78fca1597471d31a96907d5be465ca1ec1.tar.gz pugl-44e65f78fca1597471d31a96907d5be465ca1ec1.tar.bz2 pugl-44e65f78fca1597471d31a96907d5be465ca1ec1.zip |
Factor out puglIsValidPosition()
Diffstat (limited to 'src/mac.m')
-rw-r--r-- | src/mac.m | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1167,7 +1167,7 @@ getInitialFrame(PuglView* const view) const int x = view->defaultX; const int y = view->defaultY; - if (x >= INT16_MIN && x <= INT16_MAX && y >= INT16_MIN && y <= INT16_MAX) { + if (puglIsValidPosition(x, y)) { // Use the default position set with puglSetPosition while unrealized const PuglRect frame = {(PuglCoord)x, (PuglCoord)y, @@ -1773,7 +1773,7 @@ puglSetFrame(PuglView* view, const PuglRect frame) PuglStatus puglSetPosition(PuglView* const view, const int x, const int y) { - if (x < INT16_MIN || x > INT16_MAX || y < INT16_MIN || y > INT16_MAX) { + if (!puglIsValidPosition(x, y)) { return PUGL_BAD_PARAMETER; } |