From d0f0238bef9684ce71b68debf32b2d068e19bda5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 8 Feb 2025 20:41:41 -0500 Subject: Fix puglIsvalidPosition() Most obivously, this made top-level views initially invisible on Windows because they were placed at (-32768, -32768). --- src/internal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 00867e8..ca84ed1 100644 --- a/src/internal.c +++ b/src/internal.c @@ -23,7 +23,8 @@ make_point(const PuglCoord x, const PuglCoord y) bool puglIsValidPosition(const int x, const int y) { - return x >= INT16_MIN && x < INT16_MAX && y >= INT16_MIN && y < INT16_MAX; + // INT16_MIN is a sentinel, INT16_MAX is impossible with non-zero size + return x > INT16_MIN && x < INT16_MAX && y > INT16_MIN && y < INT16_MAX; } bool -- cgit v1.2.1