diff --git a/ChangeLog b/ChangeLog index 9504dd4be..6b3135991 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-09-21 Alex Graveley + + * src/Makefile.am (metacity_SOURCES): Add inlinepixbufs.h so + that it gets generated. + + * src/frames.c (meta_frames_style_set): Update for new opaque + PangoFontMetrics. + 2001-09-17 Havoc Pennington * src/ui.c (meta_ui_init): add hackaround for the warning about diff --git a/src/Makefile.am b/src/Makefile.am index 82ef6a139..0ca65a082 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,6 +21,7 @@ metacity_SOURCES= \ frame.h \ frames.c \ frames.h \ + inlinepixbufs.h \ keybindings.c \ keybindings.h \ main.c \ diff --git a/src/frames.c b/src/frames.c index 22d5fd09f..6af4ecd14 100644 --- a/src/frames.c +++ b/src/frames.c @@ -458,18 +458,22 @@ meta_frames_style_set (GtkWidget *widget, *(frames->props) = props; { - PangoFontMetrics metrics; + PangoFontMetrics *metrics; PangoFont *font; PangoLanguage *lang; font = pango_context_load_font (gtk_widget_get_pango_context (widget), widget->style->font_desc); lang = pango_context_get_language (gtk_widget_get_pango_context (widget)); - pango_font_get_metrics (font, lang, &metrics); + metrics = pango_font_get_metrics (font, lang); g_object_unref (G_OBJECT (font)); - frames->text_height = PANGO_PIXELS (metrics.ascent + metrics.descent); + frames->text_height = + PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + + pango_font_metrics_get_descent (metrics)); + + pango_font_metrics_unref (metrics); } /* Queue a draw/resize on all frames */