aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_osx.m
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r--pugl/pugl_osx.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 4a44dab..2507fcb 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -661,6 +661,11 @@ puglCreateWindow(PuglView* view, const char* title)
}
impl->window = window;
+ if (view->min_aspect_x && view->min_aspect_y) {
+ [window setContentAspectRatio:NSMakeSize(view->min_aspect_x,
+ view->min_aspect_y)];
+ }
+
[window setContentView:impl->glview];
[impl->app activateIgnoringOtherApps:YES];
[window makeFirstResponder:impl->glview];