[mutter] Moving setting of window-scaling-factor to meta_clutter_init()



commit 33689ec5582e0729d992a71a12801cc4f8538cb2
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Sep 8 14:17:03 2014 -0400

    Moving setting of window-scaling-factor to meta_clutter_init()
    
    Setting the scaling factor immediately after calling clutter_init()
    avoids creating the stage at one size, then later resizing it to
    a different size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736279

 src/backends/meta-backend.c |    8 ++++++++
 src/core/main.c             |    8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index 7c689c2..4242081 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -454,6 +454,7 @@ static GSourceFuncs event_funcs = {
 void
 meta_clutter_init (void)
 {
+  ClutterSettings *clutter_settings;
   GSource *source;
 
   meta_create_backend ();
@@ -461,6 +462,13 @@ meta_clutter_init (void)
   if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
     g_error ("Unable to initialize Clutter.\n");
 
+  /*
+   * XXX: We cannot handle high dpi scaling yet, so fix the scale to 1
+   * for now.
+   */
+  clutter_settings = clutter_settings_get_default ();
+  g_object_set (clutter_settings, "window-scaling-factor", 1, NULL);
+
   source = g_source_new (&event_funcs, sizeof (GSource));
   g_source_attach (source, NULL);
   g_source_unref (source);
diff --git a/src/core/main.c b/src/core/main.c
index 1397217..8184f56 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -302,7 +302,6 @@ meta_init (void)
 {
   struct sigaction act;
   sigset_t empty_mask;
-  ClutterSettings *clutter_settings;
 
   sigemptyset (&empty_mask);
   act.sa_handler = SIG_IGN;
@@ -377,13 +376,6 @@ meta_init (void)
   meta_ui_init ();
 
   meta_restart_init ();
-
-  /*
-   * XXX: We cannot handle high dpi scaling yet, so fix the scale to 1
-   * for now.
-   */
-  clutter_settings = clutter_settings_get_default ();
-  g_object_set (clutter_settings, "window-scaling-factor", 1, NULL);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]