x11/stage: Remove CLUTTER_SCALE handling

Use the ClutterSettings:window-scaling-factor property instead.

https://bugzilla.gnome.org/show_bug.cgi?id=705915
This commit is contained in:
Emmanuele Bassi 2014-01-16 12:13:29 +00:00
parent afd87abb70
commit 2c8a19b8c1
2 changed files with 5 additions and 19 deletions

View File

@ -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

View File

@ -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