[mutter] frames: Simplify our frame title management
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] frames: Simplify our frame title management
- Date: Sat, 10 Jan 2015 00:36:09 +0000 (UTC)
commit 87eb5f8632d7c9ae83c95c3f15ec7606348ae98f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jan 9 16:35:30 2015 -0800
frames: Simplify our frame title management
This fixes a number of crashers when they try to change their dialog
layout at runtime because we're too tricksy with the frame title.
src/ui/frames.c | 21 ++-------------------
1 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 7014e49..b277b63 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -295,15 +295,8 @@ queue_recalc_func (gpointer key, gpointer value, gpointer data)
invalidate_whole_window (frame);
meta_core_queue_frame_resize (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
frame->xwindow);
- if (frame->text_layout)
- {
- /* save title to recreate layout */
- g_free (frame->title);
-
- frame->title = g_strdup (pango_layout_get_text (frame->text_layout));
- g_clear_object (&frame->text_layout);
- }
+ g_clear_object (&frame->text_layout);
}
static void
@@ -375,13 +368,7 @@ meta_ui_frame_ensure_layout (MetaUIFrame *frame,
layout = meta_theme_get_frame_layout (meta_theme_get_default (), type);
if (layout != frame->cache_layout)
- {
- if (frame->text_layout)
- {
- g_assert (g_str_equal (frame->title, pango_layout_get_text (frame->text_layout)));
- g_clear_object (&frame->text_layout);
- }
- }
+ g_clear_object (&frame->text_layout);
frame->cache_layout = layout;
@@ -423,10 +410,6 @@ meta_ui_frame_ensure_layout (MetaUIFrame *frame,
font_desc);
pango_font_description_free (font_desc);
-
- /* Save some RAM */
- g_free (frame->title);
- frame->title = NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]