From 6145261040c3437a768598124c3ef53d5c121c3a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 31 Jul 2007 16:53:17 +0000 Subject: [PATCH] Fix previous commit --- clutter/clutter-backend.c | 5 ++++- clutter/glx/clutter-backend-glx.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c index 8451e1d9b..064e9fee4 100644 --- a/clutter/clutter-backend.c +++ b/clutter/clutter-backend.c @@ -321,11 +321,14 @@ clutter_backend_set_resolution (ClutterBackend *backend, gdouble dpi) { ClutterFixed fixed_dpi; + ClutterBackendPrivate *priv; g_return_if_fail (CLUTTER_IS_BACKEND (backend)); if (dpi < 0) - dpi = -1.0 + dpi = -1.0; + + priv = backend->priv; fixed_dpi = CLUTTER_FLOAT_TO_FIXED (dpi); if (priv->resolution != fixed_dpi) diff --git a/clutter/glx/clutter-backend-glx.c b/clutter/glx/clutter-backend-glx.c index 25e9d313c..b3f4a4d21 100644 --- a/clutter/glx/clutter-backend-glx.c +++ b/clutter/glx/clutter-backend-glx.c @@ -205,8 +205,8 @@ clutter_backend_glx_post_parse (ClutterBackend *backend, } #endif - dpi = (((double) DisplayHeight (xdisplay, xscreen) * 25.4) - / (double) DisplayHeightMM (xdisplay, xscreen)); + dpi = (((double) DisplayHeight (backend_glx->xdpy, backend_glx->xscreen_num) * 25.4) + / (double) DisplayHeightMM (backend_glx->xdpy, backend_glx->xscreen_num)); clutter_backend_set_resolution (backend, dpi);