From ef19bb7e8f170db9fcd32b89b413c9b0a8f6d8c4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 27 Dec 2022 13:05:04 -0500 Subject: Set transient parent when views are realized if necessary --- src/mac.m | 3 +++ src/win.c | 4 ++++ src/x11.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mac.m b/src/mac.m index 186e612..f665210 100644 --- a/src/mac.m +++ b/src/mac.m @@ -1162,6 +1162,9 @@ puglRealize(PuglView* view) updateSizeHints(view); puglSetFrame(view, view->frame); + if (view->transientParent) { + puglSetTransientParent(view, view->transientParent); + } [window setContentView:impl->wrapperView]; [view->world->impl->app activateIgnoringOtherApps:YES]; diff --git a/src/win.c b/src/win.c index 639f200..34ad4c3 100644 --- a/src/win.c +++ b/src/win.c @@ -256,6 +256,10 @@ puglRealize(PuglView* view) puglSetWindowTitle(view, view->title); } + if (view->transientParent) { + puglSetTransientParent(view, view->transientParent); + } + view->impl->scaleFactor = puglWinGetViewScaleFactor(view); view->impl->cursor = LoadCursor(NULL, IDC_ARROW); diff --git a/src/x11.c b/src/x11.c index 2ded392..6affa9f 100644 --- a/src/x11.c +++ b/src/x11.c @@ -457,7 +457,7 @@ puglRealize(PuglView* const view) } if (view->transientParent) { - XSetTransientForHint(display, impl->win, (Window)view->transientParent); + puglSetTransientParent(view, view->transientParent); } // Create input context -- cgit v1.2.1