diff options
Diffstat (limited to 'pugl/detail/win.c')
-rw-r--r-- | pugl/detail/win.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pugl/detail/win.c b/pugl/detail/win.c index 44ba6cd..cb9a69c 100644 --- a/pugl/detail/win.c +++ b/pugl/detail/win.c @@ -979,6 +979,23 @@ puglSetAspectRatio(PuglView* const view, return PUGL_SUCCESS; } +PuglStatus +puglSetTransientFor(PuglView* view, PuglNativeView parent) +{ + if (view->parent) { + return PUGL_FAILURE; + } + + view->transientParent = parent; + + if (view->impl->hwnd) { + SetWindowLongPtr(view->impl->hwnd, GWLP_HWNDPARENT, (LONG_PTR)parent); + return GetLastError() == NO_ERROR ? PUGL_SUCCESS : PUGL_FAILURE; + } + + return PUGL_SUCCESS; +} + const void* puglGetClipboard(PuglView* const view, const char** const type, |