diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | src/effects.c | 2 | ||||
-rw-r--r-- | src/screen.c | 13 |
3 files changed, 22 insertions, 5 deletions
@@ -1,8 +1,12 @@ -2005-06-02 Elijah Newren <newren@gmail.com> +2005-06-07 Ray Strode <rstrode@redhat.com> + + Cleanup font data when done with it (bug 306720). - * src/window.c (meta_window_configure_request): If a window - requests to be raised and is denied, set the demands attention - hint. Fixes #305882. + * src/effects.c (draw_xor_rect): free font info structure. + * src/screen.c (meta_screen_new): pass a 1 not a 0 to + XFreeFontInfo to free font info structure. + (meta_screen_free): call XUnloadFont on GC font before freeing + the GC. 2005-06-02 Elijah Newren <newren@gmail.com> diff --git a/src/effects.c b/src/effects.c index 17f340b1..122387b2 100644 --- a/src/effects.c +++ b/src/effects.c @@ -523,6 +523,8 @@ draw_xor_rect (MetaScreen *screen, g_free (text); + XFreeFontInfo (NULL, font_struct, 1); + if ((box_width + LINE_WIDTH) >= (rect->width / 3)) return; diff --git a/src/screen.c b/src/screen.c index 75a7bb3c..30b79aad 100644 --- a/src/screen.c +++ b/src/screen.c @@ -563,7 +563,7 @@ meta_screen_new (MetaDisplay *display, { gc_values.font = font_info->fid; value_mask |= GCFont; - XFreeFontInfo (NULL, font_info, 0); + XFreeFontInfo (NULL, font_info, 1); } else meta_warning ("xserver doesn't have 'fixed' font.\n"); @@ -671,6 +671,7 @@ void meta_screen_free (MetaScreen *screen) { MetaDisplay *display; + XGCValues gc_values = { 0 }; display = screen->display; @@ -721,6 +722,16 @@ meta_screen_free (MetaScreen *screen) if (screen->work_area_idle != 0) g_source_remove (screen->work_area_idle); + + if (XGetGCValues (screen->display->xdisplay, + screen->root_xor_gc, + GCFont, + &gc_values)) + { + XUnloadFont (screen->display->xdisplay, + gc_values.font); + } + XFreeGC (screen->display->xdisplay, screen->root_xor_gc); |