summaryrefslogtreecommitdiff
path: root/src/twm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/twm.c')
-rw-r--r--src/twm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/twm.c b/src/twm.c
index 1221bf8..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,6 +922,7 @@ Done(XtPointer client_data _X_UNUSED, XtSignalId *si2 _X_UNUSED)
{
if (dpy) {
Reborder(CurrentTime);
+ DestroyFonts();
XCloseDisplay(dpy);
}