comparison gtk/dw.c @ 149:6028f787f7c8

Fixed a graphics context leak in dw_draw_text().
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 24 Oct 2002 05:39:00 +0000
parents 830f591c87f1
children 2a0d7b57a6da
comparison
equal deleted inserted replaced
148:830f591c87f1 149:6028f787f7c8
4722 { 4722 {
4723 gint ascent; 4723 gint ascent;
4724 4724
4725 gdk_text_extents(font, text, strlen(text), NULL, NULL, NULL, &ascent, NULL); 4725 gdk_text_extents(font, text, strlen(text), NULL, NULL, NULL, &ascent, NULL);
4726 gdk_draw_text(handle ? handle->window : pixmap->pixmap, font, gc, x, y + ascent + 2, text, strlen(text)); 4726 gdk_draw_text(handle ? handle->window : pixmap->pixmap, font, gc, x, y + ascent + 2, text, strlen(text));
4727 gdk_gc_unref(gc);
4728 gdk_font_unref(font); 4727 gdk_font_unref(font);
4729 } 4728 }
4730 #endif 4729 #endif
4730 gdk_gc_unref(gc);
4731 } 4731 }
4732 DW_MUTEX_UNLOCK; 4732 DW_MUTEX_UNLOCK;
4733 } 4733 }
4734 4734
4735 /* Query the width and height of a text string. 4735 /* Query the width and height of a text string.