[Xfce4-commits] <xfce4-settings:nick/xsettingsd-merge> Some small fixes in pointer debugging.

Nick Schermer noreply at xfce.org
Fri Feb 25 10:18:02 CET 2011


Updating branch refs/heads/nick/xsettingsd-merge
         to c4f0b9402db25c0bdf559dda0902d997310a6446 (commit)
       from 5f886c3a90a4632266fb93ada7f7e6641bae94d3 (commit)

commit c4f0b9402db25c0bdf559dda0902d997310a6446
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Feb 25 10:15:40 2011 +0100

    Some small fixes in pointer debugging.

 xfsettingsd/pointers.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/xfsettingsd/pointers.c b/xfsettingsd/pointers.c
index ac606a6..10ff9db 100644
--- a/xfsettingsd/pointers.c
+++ b/xfsettingsd/pointers.c
@@ -152,6 +152,9 @@ xfce_pointers_helper_init (XfcePointersHelper *helper)
     }
     else
     {
+        xfsettings_dbg (XFSD_DEBUG_POINTERS, "initialized xi %d.%d",
+                        version->major_version, version->minor_version);
+
         /* open the channel */
         helper->channel = xfconf_channel_get ("pointers");
 
@@ -233,6 +236,7 @@ xfce_pointers_helper_change_button_mapping (XDeviceInfo *device_info,
     guchar       *buttonmap;
     gint          n;
     gint          right_button;
+    GString      *readable_map;
 
     /* get the device classes */
     ptr = device_info->inputclassinfo;
@@ -291,8 +295,12 @@ xfce_pointers_helper_change_button_mapping (XDeviceInfo *device_info,
         if (gdk_error_trap_pop ())
           g_warning ("Failed to set button mapping");
 
+        readable_map = g_string_sized_new (num_buttons);
+        for (n = 0; n < num_buttons; n++)
+            g_string_append_printf (readable_map, "%d;", buttonmap[n]);
         xfsettings_dbg (XFSD_DEBUG_POINTERS, "[%s] new buttonmap is \"%s\"",
-                        device_info->name, buttonmap);
+                        device_info->name, readable_map->str);
+        g_string_free (readable_map, TRUE);
 
 out:    g_free (buttonmap);
     }
@@ -465,8 +473,6 @@ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
                     threshold_str = g_strdup_printf ("/%s/Threshold", device_name);
                     acceleration_str = g_strdup_printf ("/%s/Acceleration", device_name);
 
-                    xfsettings_dbg (XFSD_DEBUG_POINTERS, "[%s] reset values", device_info->name);
-
                     /* restore the button mapping */
                     xfce_pointers_helper_change_button_mapping (device_info, device, xdisplay,
                                                                 xfconf_channel_get_bool (helper->channel, righthanded_str, TRUE) ? 1 : 0,



More information about the Xfce4-commits mailing list