aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/mac.m')
-rw-r--r--src/mac.m10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mac.m b/src/mac.m
index ca1ec4d..2965e7d 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -1298,12 +1298,10 @@ puglRealize(PuglView* view)
((NSWindow*)window).delegate =
[[PuglWindowDelegate alloc] initWithPuglWindow:window];
- updateSizeHints(view);
-
+ // Set basic window hints and attributes
puglSetFrame(view, initialFrame);
- if (view->transientParent) {
- puglSetTransientParent(view, view->transientParent);
- }
+ puglSetTransientParent(view, view->transientParent);
+ updateSizeHints(view);
[window setContentView:impl->wrapperView];
[view->world->impl->app activateIgnoringOtherApps:YES];
@@ -1847,7 +1845,7 @@ puglSetTransientParent(PuglView* view, PuglNativeView parent)
view->transientParent = parent;
- if (view->impl->window) {
+ if (parent && view->impl->window) {
NSWindow* parentWindow = [(NSView*)parent window];
if (parentWindow) {
[parentWindow addChildWindow:view->impl->window ordered:NSWindowAbove];