[mutter] ui: We now always have a theme
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] ui: We now always have a theme
- Date: Thu, 1 Jan 2015 06:44:56 +0000 (UTC)
commit b47afe89d3151e75d3b4879c1f9aa7d096ca8969
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Dec 31 21:33:54 2014 -0800
ui: We now always have a theme
src/ui/ui.c | 45 ++++++++++++++++-----------------------------
src/ui/ui.h | 2 --
2 files changed, 16 insertions(+), 31 deletions(-)
---
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 4f0a7f7..a00434f 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -531,47 +531,34 @@ meta_ui_theme_get_frame_borders (MetaUI *ui,
const PangoFontDescription *font_desc;
PangoFontDescription *free_font_desc = NULL;
- if (meta_ui_have_a_theme ())
- {
- GdkDisplay *display = gdk_x11_lookup_xdisplay (ui->xdisplay);
- GdkScreen *screen = gdk_display_get_screen (display, XScreenNumberOfScreen (ui->xscreen));
+ GdkDisplay *display = gdk_x11_lookup_xdisplay (ui->xdisplay);
+ GdkScreen *screen = gdk_display_get_screen (display, XScreenNumberOfScreen (ui->xscreen));
- style_info = meta_theme_create_style_info (screen, NULL);
+ style_info = meta_theme_create_style_info (screen, NULL);
- context = gtk_widget_get_pango_context (GTK_WIDGET (ui->frames));
- font_desc = meta_prefs_get_titlebar_font ();
+ context = gtk_widget_get_pango_context (GTK_WIDGET (ui->frames));
+ font_desc = meta_prefs_get_titlebar_font ();
- if (!font_desc)
- {
- free_font_desc = meta_style_info_create_font_desc (style_info);
- font_desc = (const PangoFontDescription *) free_font_desc;
- }
+ if (!font_desc)
+ {
+ free_font_desc = meta_style_info_create_font_desc (style_info);
+ font_desc = (const PangoFontDescription *) free_font_desc;
+ }
- text_height = meta_pango_font_desc_get_text_height (font_desc, context);
+ text_height = meta_pango_font_desc_get_text_height (font_desc, context);
- meta_theme_get_frame_borders (meta_theme_get_default (),
- style_info, type, text_height, flags,
- borders);
+ meta_theme_get_frame_borders (meta_theme_get_default (),
+ style_info, type, text_height, flags,
+ borders);
- if (free_font_desc)
- pango_font_description_free (free_font_desc);
- }
- else
- {
- meta_frame_borders_clear (borders);
- }
+ if (free_font_desc)
+ pango_font_description_free (free_font_desc);
if (style_info != NULL)
meta_style_info_unref (style_info);
}
gboolean
-meta_ui_have_a_theme (void)
-{
- return meta_theme_get_default () != NULL;
-}
-
-gboolean
meta_ui_window_is_widget (MetaUI *ui,
Window xwindow)
{
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 5d77537..bf0a358 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -104,8 +104,6 @@ void meta_ui_repaint_frame (MetaUI *ui,
gboolean meta_ui_window_should_not_cause_focus (Display *xdisplay,
Window xwindow);
-gboolean meta_ui_have_a_theme (void);
-
gboolean meta_ui_window_is_widget (MetaUI *ui,
Window xwindow);
gboolean meta_ui_window_is_dummy (MetaUI *ui,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]