[Xfce4-commits] <xfce4-settings:bluesabre/display-settings> Improve debug statements

Simon Steinbeiss noreply at xfce.org
Thu Oct 18 23:38:15 CEST 2012


Updating branch refs/heads/bluesabre/display-settings
         to 0726b622b7e3bd4a7b22fcca11bb7ce5803e8758 (commit)
       from ae5c5d0fc5b730fd1ca0538de105aae0f02c3933 (commit)

commit 0726b622b7e3bd4a7b22fcca11bb7ce5803e8758
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Thu Oct 18 15:23:59 2012 +0200

    Improve debug statements
    
    Signed-off-by: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>

 xfsettingsd/displays.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 5af8614..2212092 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -412,6 +412,10 @@ xfce_displays_helper_set_outputs (XfceRRCrtc *crtc,
 
     g_assert (crtc);
 
+    for (n = 0; n < crtc->noutput; ++n)
+        xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "CRTC %lu, output list[%d] -> %lu.", crtc->id, n,
+                        crtc->outputs[n]);
+
     /* check if the output is already present */
     for (n = 0; n < crtc->noutput; ++n)
     {
@@ -430,9 +434,8 @@ xfce_displays_helper_set_outputs (XfceRRCrtc *crtc,
     crtc->outputs [crtc->noutput++] = output;
     crtc->changed = TRUE;
 
-    for (n = 0; n < crtc->noutput; ++n)
-        xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "CRTC %lu, output list: %d -> %lu.", crtc->id, n,
-                        crtc->outputs[n]);
+    xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "CRTC %lu, output list[%d] -> %lu.", crtc->id,
+                    crtc->noutput - 1, crtc->outputs[crtc->noutput - 1]);
 }
 
 
@@ -759,9 +762,6 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper *helper,
 
     }
 
-    xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Desktop dimensions: %dx%d (px), %dx%d (mm).",
-                    width, height, mm_width, mm_height);
-
     /* set the screen size only if it's really needed and valid */
     if (width >= min_width && width <= max_width
         && height >= min_height && height <= max_height
@@ -769,8 +769,12 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper *helper,
             || height != gdk_screen_height ()
             || mm_width != gdk_screen_width_mm ()
             || mm_height != gdk_screen_height_mm ()))
+    {
+        xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Applying desktop dimensions: %dx%d (px), %dx%d (mm).",
+                        width, height, mm_width, mm_height);
         XRRSetScreenSize (xdisplay, GDK_WINDOW_XID (root_window),
                           width, height, mm_width, mm_height);
+    }
 
     /* final loop, apply crtc changes */
     for (m = 0; m < resources->ncrtc; ++m)


More information about the Xfce4-commits mailing list