From 616dfbbea24601175a6b378ae1ec1c62a901e377 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 27 Dec 2022 13:04:39 -0500 Subject: Fail to set transient parent of views with a parent window --- src/mac.m | 4 ++++ src/x11.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/mac.m b/src/mac.m index 72b3e5f..186e612 100644 --- a/src/mac.m +++ b/src/mac.m @@ -1562,6 +1562,10 @@ puglSetSizeHint(PuglView* const view, PuglStatus puglSetTransientParent(PuglView* view, PuglNativeView parent) { + if (view->parent) { + return PUGL_FAILURE; + } + view->transientParent = parent; if (view->impl->window) { diff --git a/src/x11.c b/src/x11.c index fc0e2af..2ded392 100644 --- a/src/x11.c +++ b/src/x11.c @@ -1656,6 +1656,10 @@ puglSetTransientParent(PuglView* const view, const PuglNativeView parent) { Display* display = view->world->impl->display; + if (view->parent) { + return PUGL_FAILURE; + } + view->transientParent = parent; if (view->impl->win) { -- cgit v1.2.1