summaryrefslogtreecommitdiff
path: root/src/twm.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2024-08-02 09:03:40 +0200
committerMatthieu Herrb <matthieu@herrb.eu>2024-08-02 09:03:40 +0200
commite7da3828207713d529a10e093a40d5abba1c0220 (patch)
tree7320ad1a7c7e891c00827e9b2867a1e0fbc2d536 /src/twm.c
parente8fc1baf5ad574a01b65e3a3ec415f212f326550 (diff)
parent64edeaaa4c7492d090b4069de2eae5f411ff1cd4 (diff)
Merge remote-tracking branch 'origin/master' into obsdobsd
Diffstat (limited to 'src/twm.c')
-rw-r--r--src/twm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/twm.c b/src/twm.c
index 4be177c..d383873 100644
--- a/src/twm.c
+++ b/src/twm.c
@@ -813,6 +813,25 @@ CreateFonts(void)
Scr->HaveFonts = TRUE;
}
+static void
+DestroyFonts(void)
+{
+ for (int i = 0; i < NumScreens; ++i) {
+ ScreenInfo *scr = ScreenList[i];
+
+ if (!scr) {
+ continue;
+ }
+
+ DestroyFont(&scr->TitleBarFont);
+ DestroyFont(&scr->MenuFont);
+ DestroyFont(&scr->IconFont);
+ DestroyFont(&scr->SizeFont);
+ DestroyFont(&scr->IconManagerFont);
+ DestroyFont(&scr->DefaultFont);
+ }
+}
+
void
RestoreWithdrawnLocation(TwmWindow *tmp)
{
@@ -903,8 +922,11 @@ Done(XtPointer client_data _X_UNUSED, XtSignalId *si2 _X_UNUSED)
{
if (dpy) {
Reborder(CurrentTime);
+ DestroyFonts();
XCloseDisplay(dpy);
}
+
+ DestroySession();
exit(EXIT_SUCCESS);
}