aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-11 12:17:48 -0500
committerDavid Robillard <d@drobilla.net>2023-01-11 12:29:17 -0500
commit312196f453651ffc95e44f7b7d6aff9b6e2b6329 (patch)
tree65ee8327edfd8aa26640fb88178dc5aa2432d739
parent39ab78d4e6a624c66d1a59495fbf47a83f209b17 (diff)
downloadpugl-312196f453651ffc95e44f7b7d6aff9b6e2b6329.tar.gz
pugl-312196f453651ffc95e44f7b7d6aff9b6e2b6329.tar.bz2
pugl-312196f453651ffc95e44f7b7d6aff9b6e2b6329.zip
Reduce duplicated code
-rw-r--r--src/x11.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/x11.c b/src/x11.c
index 6fe5b8b..96a7e17 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -756,20 +756,10 @@ void
puglFreeViewInternals(PuglView* const view)
{
if (view && view->impl) {
- clearX11Clipboard(&view->impl->clipboard);
+ puglUnrealize(view);
free(view->impl->clipboard.data.data);
free(view->impl->clipboard.formats);
free(view->impl->clipboard.formatStrings);
- if (view->impl->xic) {
- XDestroyIC(view->impl->xic);
- }
- if (view->backend) {
- view->backend->destroy(view);
- }
- if (view->world->impl->display && view->impl->win) {
- XDestroyWindow(view->world->impl->display, view->impl->win);
- }
- XFree(view->impl->vi);
free(view->impl);
}
}