From 312196f453651ffc95e44f7b7d6aff9b6e2b6329 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Jan 2023 12:17:48 -0500 Subject: Reduce duplicated code --- src/x11.c | 12 +----------- 1 file changed, 1 insertion(+), 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); } } -- cgit v1.2.1