diff options
Diffstat (limited to 'pugl/detail/mac.m')
-rw-r--r-- | pugl/detail/mac.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m index 501be02..480253e 100644 --- a/pugl/detail/mac.m +++ b/pugl/detail/mac.m @@ -1154,6 +1154,23 @@ puglSetAspectRatio(PuglView* const view, return PUGL_SUCCESS; } +PuglStatus +puglSetTransientFor(PuglView* view, PuglNativeView parent) +{ + view->transientParent = parent; + + if (view->impl->window) { + NSWindow* parentWindow = [(NSView*)parent window]; + if (parentWindow) { + [parentWindow addChildWindow:view->impl->window + ordered:NSWindowAbove]; + return PUGL_SUCCESS; + } + } + + return PUGL_FAILURE; +} + const void* puglGetClipboard(PuglView* const view, const char** const type, |