mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
Cleanup font data when done with it (bug 306720).
2005-06-07 Ray Strode <rstrode@redhat.com> Cleanup font data when done with it (bug 306720). * 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.
This commit is contained in:
parent
1ff193b819
commit
064a86e620
12
ChangeLog
12
ChangeLog
@ -1,8 +1,12 @@
|
||||
2005-06-02 Elijah Newren <newren@gmail.com>
|
||||
2005-06-07 Ray Strode <rstrode@redhat.com>
|
||||
|
||||
* src/window.c (meta_window_configure_request): If a window
|
||||
requests to be raised and is denied, set the demands attention
|
||||
hint. Fixes #305882.
|
||||
Cleanup font data when done with it (bug 306720).
|
||||
|
||||
* 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>
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
13
src/screen.c
13
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user