diff options
author | sabetts <sabetts> | 2001-04-08 23:05:54 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-04-08 23:05:54 +0000 |
commit | 9212e07af155dbfd2df9174a07c557c37f43c639 (patch) | |
tree | 0e142cc73f6a4cfdc12d338cf0ba5e2d7e6666c3 | |
parent | 8b6f270c70d8fa6898e7d6c3b9533026c757f48c (diff) | |
download | ratpoison-9212e07af155dbfd2df9174a07c557c37f43c639.zip |
(clean_up): destroys resources stored in screens
(init_rat_cursor): frees the pixmaps
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/main.c | 19 |
2 files changed, 24 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2001-04-08 shawn <sabetts@diggin.lamenet.tmp> + + * src/main.c (clean_up): destroys resources stored in screens + (init_rat_cursor): frees the pixmaps + 2001-04-06 shawn <sabetts@diggin.lamenet.tmp> * src/split.h (hide_frame_indicator): new prototype @@ -469,6 +469,9 @@ init_rat_cursor (screen_info *s) 1, 0, 1); s->rat = XCreatePixmapCursor(dpy, fore, mask, &fg, &bg, RAT_HOT_X, RAT_HOT_Y); + + XFreePixmap (dpy, fore); + XFreePixmap (dpy, mask); } static void @@ -555,6 +558,22 @@ init_screen (screen_info *s, int screen_num) void clean_up () { + int i; + + for (i=0; i<num_screens; i++) + { + XDestroyWindow (dpy, screens[i].bar_window); + XDestroyWindow (dpy, screens[i].key_window); + XDestroyWindow (dpy, screens[i].input_window); + XDestroyWindow (dpy, screens[i].frame_window); + + XFreeCursor (dpy, screens[i].rat); + XFreeColormap (dpy, screens[i].def_cmap); + XFreeGC (dpy, screens[i].normal_gc); + } + + XFreeFont (dpy, font); + XSetInputFocus (dpy, PointerRoot, RevertToPointerRoot, CurrentTime); XCloseDisplay (dpy); } |