[clutter/clutter-1.18] x11/stage: Remove CLUTTER_SCALE handling



commit 2c8a19b8c1cec4bfdaa48a8a746209165c52479f
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jan 16 12:13:29 2014 +0000

    x11/stage: Remove CLUTTER_SCALE handling
    
    Use the ClutterSettings:window-scaling-factor property instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705915

 clutter/x11/clutter-stage-x11.c |   23 +++++------------------
 clutter/x11/clutter-stage-x11.h |    1 -
 2 files changed, 5 insertions(+), 19 deletions(-)
---
diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c
index 047e08c..baaddb0 100644
--- a/clutter/x11/clutter-stage-x11.c
+++ b/clutter/x11/clutter-stage-x11.c
@@ -822,9 +822,6 @@ clutter_stage_x11_set_scale_factor (ClutterStageWindow *stage_window,
 {
   ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (stage_window);
 
-  if (stage_x11->fixed_scale_factor)
-    return;
-
   stage_x11->scale_factor = factor;
 }
 
@@ -869,8 +866,6 @@ clutter_stage_x11_class_init (ClutterStageX11Class *klass)
 static void
 clutter_stage_x11_init (ClutterStageX11 *stage)
 {
-  const char *scale_str;
-
   stage->xwin = None;
   stage->xwin_width = 640;
   stage->xwin_height = 480;
@@ -884,19 +879,11 @@ clutter_stage_x11_init (ClutterStageX11 *stage)
 
   stage->title = NULL;
 
-  scale_str = g_getenv ("CLUTTER_SCALE");
-  if (scale_str != NULL)
-    {
-      CLUTTER_NOTE (BACKEND, "Scale factor set using environment variable: %d ('%s')",
-                    atol (scale_str),
-                    scale_str);
-      stage->fixed_scale_factor = TRUE;
-      stage->scale_factor = atol (scale_str);
-      stage->xwin_width *= stage->scale_factor;
-      stage->xwin_height *= stage->scale_factor;
-    }
-  else
-    stage->scale_factor = 1;
+  g_object_get (clutter_settings_get_default (),
+                "window-scaling-factor", &stage->scale_factor,
+                NULL);
+  stage->xwin_width *= stage->scale_factor;
+  stage->xwin_height *= stage->scale_factor;
 }
 
 static void
diff --git a/clutter/x11/clutter-stage-x11.h b/clutter/x11/clutter-stage-x11.h
index 453373c..a359c99 100644
--- a/clutter/x11/clutter-stage-x11.h
+++ b/clutter/x11/clutter-stage-x11.h
@@ -69,7 +69,6 @@ struct _ClutterStageX11
   guint viewport_initialized  : 1;
   guint accept_focus          : 1;
   guint fullscreen_on_realize : 1;
-  guint fixed_scale_factor    : 1;
 };
 
 struct _ClutterStageX11Class


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