aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mac.m4
-rw-r--r--src/x11.c4
2 files changed, 8 insertions, 0 deletions
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) {