aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-02-08 16:48:43 -0500
committerDavid Robillard <d@drobilla.net>2025-02-08 18:02:30 -0500
commit23b0774862b79543b93a9b50b4f085c2c396698a (patch)
treed389c9950c0c55c29addab14702f796d97ade25b /src/mac.m
parent494932c79800698bcd30a506c6abe7f43c59d2bd (diff)
downloadpugl-23b0774862b79543b93a9b50b4f085c2c396698a.tar.gz
pugl-23b0774862b79543b93a9b50b4f085c2c396698a.tar.bz2
pugl-23b0774862b79543b93a9b50b4f085c2c396698a.zip
Add PUGL_CURRENT_SIZE hint and make size hints dynamic
Diffstat (limited to 'src/mac.m')
-rw-r--r--src/mac.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mac.m b/src/mac.m
index ee7bb27..b6867a4 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -1118,6 +1118,7 @@ updateSizeHint(PuglView* const view, const PuglSizeHint hint)
switch (hint) {
case PUGL_DEFAULT_SIZE:
+ case PUGL_CURRENT_SIZE:
break;
case PUGL_MIN_SIZE:
@@ -1789,7 +1790,9 @@ puglSetSizeHint(PuglView* const view,
{
const PuglStatus st = puglStoreSizeHint(view, hint, width, height);
- return (!st && view->impl->window) ? updateSizeHint(view, hint) : st;
+ return st ? st
+ : (hint == PUGL_CURRENT_SIZE) ? puglSetSize(view, width, height)
+ : updateSizeHint(view, hint);
}
PuglStatus