[gnome-shell] shell-global: Move shell_fonts_init() back to main
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell-global: Move shell_fonts_init() back to main
- Date: Fri, 18 Jan 2013 05:26:00 +0000 (UTC)
commit 622c1c923601caf5d12f4a7ca7943c28268caabc
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Dec 22 23:14:14 2012 -0500
shell-global: Move shell_fonts_init() back to main
We do not need any stage-specific code, so let's move
the initialization back to where other components are
initialized.
https://bugzilla.gnome.org/show_bug.cgi?id=691745
src/main.c | 16 ++++++++++++++++
src/shell-global.c | 17 -----------------
2 files changed, 16 insertions(+), 17 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index a07b5c4..8e805a6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <string.h>
+#include <cogl-pango/cogl-pango.h>
#include <clutter/clutter.h>
#include <clutter/x11/clutter-x11.h>
#include <gdk/gdk.h>
@@ -195,6 +196,20 @@ shell_introspection_init (void)
}
static void
+shell_fonts_init (void)
+{
+ CoglPangoFontMap *fontmap;
+
+ /* Disable text mipmapping; it causes problems on pre-GEM Intel
+ * drivers and we should just be rendering text at the right
+ * size rather than scaling it. If we do effects where we dynamically
+ * zoom labels, then we might want to reconsider.
+ */
+ fontmap = COGL_PANGO_FONT_MAP (clutter_get_font_map ());
+ cogl_pango_font_map_set_use_mipmapping (fontmap, FALSE);
+}
+
+static void
malloc_statistics_callback (ShellPerfLog *perf_log,
gpointer data)
{
@@ -396,6 +411,7 @@ main (int argc, char **argv)
shell_perf_log_init ();
shell_prefs_init ();
shell_introspection_init ();
+ shell_fonts_init ();
/* Turn on telepathy-glib debugging but filter it out in
* default_log_handler. This handler also exposes all the logs over D-Bus
diff --git a/src/shell-global.c b/src/shell-global.c
index 10b1fc1..af7b4ae 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -15,7 +15,6 @@
#endif
#include <X11/extensions/Xfixes.h>
-#include <cogl-pango/cogl-pango.h>
#include <canberra.h>
#include <clutter/glx/clutter-glx.h>
#include <clutter/x11/clutter-x11.h>
@@ -811,20 +810,6 @@ global_stage_after_paint (ClutterStage *stage,
"clutter.stagePaintDone");
}
-static void
-shell_fonts_init (ClutterStage *stage)
-{
- CoglPangoFontMap *fontmap;
-
- /* Disable text mipmapping; it causes problems on pre-GEM Intel
- * drivers and we should just be rendering text at the right
- * size rather than scaling it. If we do effects where we dynamically
- * zoom labels, then we might want to reconsider.
- */
- fontmap = COGL_PANGO_FONT_MAP (clutter_get_font_map ());
- cogl_pango_font_map_set_use_mipmapping (fontmap, FALSE);
-}
-
/* This is an IBus workaround. The flow of events with IBus is that every time
* it gets gets a key event, it:
*
@@ -963,8 +948,6 @@ _shell_global_set_plugin (ShellGlobal *global,
g_signal_connect (global->meta_display, "notify::focus-window",
G_CALLBACK (focus_window_changed), global);
- shell_fonts_init (global->stage);
-
gdk_event_handler_set (gnome_shell_gdk_event_handler, global->stage, NULL);
global->focus_manager = st_focus_manager_get_for_stage (global->stage);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]