aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-07 19:27:05 -0500
committerDavid Robillard <d@drobilla.net>2023-01-07 19:27:05 -0500
commitba11bb80c96fc9c9124ba2fa929425f558f86824 (patch)
tree00ecd9857e672a101d722d86ef22a9cb48f8f827 /src/x11.c
parent28631e2b202e661084039464f45228b9ce323a8f (diff)
downloadpugl-ba11bb80c96fc9c9124ba2fa929425f558f86824.tar.gz
pugl-ba11bb80c96fc9c9124ba2fa929425f558f86824.tar.bz2
pugl-ba11bb80c96fc9c9124ba2fa929425f558f86824.zip
Rename create/destroy events to realize/unrealize
As evidence that this was confusing, the documentation for these was an outright lie, and I've burned quite a bit of time in the past few days trying to rework things based around that flawed understanding. These names make it clear what these events actually are. If we need actual create/destroy events with a broader scope, they'll have to be added, but I suspect those aren't actually useful anyway.
Diffstat (limited to 'src/x11.c')
-rw-r--r--src/x11.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/x11.c b/src/x11.c
index c3bf31f..a6daf72 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -475,7 +475,7 @@ puglRealize(PuglView* const view)
(XIM)0);
}
- puglDispatchSimpleEvent(view, PUGL_CREATE);
+ st = puglDispatchSimpleEvent(view, PUGL_REALIZE);
/* Flush before returning for two reasons: so that hints are available to the
view's parent via the X server during embedding, and so that the X server
@@ -484,8 +484,7 @@ puglRealize(PuglView* const view)
increases the chances that an application will be cleanly configured once
on startup with the correct position and size. */
XFlush(display);
-
- return PUGL_SUCCESS;
+ return st;
}
PuglStatus
@@ -496,7 +495,7 @@ puglUnrealize(PuglView* const view)
return PUGL_FAILURE;
}
- puglDispatchSimpleEvent(view, PUGL_DESTROY);
+ puglDispatchSimpleEvent(view, PUGL_UNREALIZE);
clearX11Clipboard(&impl->clipboard);
if (impl->xic) {