diff options
author | 2 <alexl@redhat.com> | 2001-01-22 12:40:35 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2001-01-22 12:40:35 +0000 |
commit | 18cb3ee139977e975201b9da81794b5ff7f0826c (patch) | |
tree | d61507d0d17f67325e94d2f350e3bde58607fe6f /gtk/gtkwindow-decorate.c | |
parent | 8c9eb8b6a04917a6018ecd01bf5a707c8e3a88ce (diff) | |
download | gtk+-18cb3ee139977e975201b9da81794b5ff7f0826c.tar.gz |
Don't leak the PangoFontDescriptor.
2001-01-22 <alexl@redhat.com>
* gtk/gtkwindow-decorate.c (gtk_decorated_window_realize):
Don't leak the PangoFontDescriptor.
Diffstat (limited to 'gtk/gtkwindow-decorate.c')
-rw-r--r-- | gtk/gtkwindow-decorate.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtkwindow-decorate.c b/gtk/gtkwindow-decorate.c index c12f52bad8..1e6690a2c0 100644 --- a/gtk/gtkwindow-decorate.c +++ b/gtk/gtkwindow-decorate.c @@ -255,12 +255,14 @@ gtk_decorated_window_realize (GtkWindow *window) { GtkWindowDecoration *deco = get_decoration (window); GtkWidget *widget = GTK_WIDGET (window); + PangoFontDescription *font_desc; deco->title_layout = gtk_widget_create_pango_layout (widget, (window->title)?window->title:""); - - pango_layout_set_font_description (deco->title_layout, - pango_font_description_from_string(DECORATION_TITLE_FONT)); + + font_desc = pango_font_description_from_string(DECORATION_TITLE_FONT); + pango_layout_set_font_description (deco->title_layout, font_desc); + pango_font_description_free (font_desc); gdk_fb_window_set_child_handler (window->frame, gtk_decorated_window_inner_change, @@ -674,7 +676,7 @@ gtk_decorated_window_move_resize_window (GtkWindow *window, GtkWindowDecoration *deco = get_decoration (window); deco->real_inner_move = TRUE; - gdk_window_move_resize (GTK_WIDGET (window)->window, + gdk_window_move_resize (widget->window, x, y, width, height); } #else |