Commit 064a86e6 authored by Ray Strode's avatar Ray Strode Committed by Ray Strode
Browse files

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.
parent 1ff193b8
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>
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment