[gtk+] x11: Add debugging output for xsettings code
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Add debugging output for xsettings code
- Date: Tue, 19 Feb 2013 13:47:52 +0000 (UTC)
commit 0c58cb744ce65ddd6a9465fa8b86e67dc72f80c7
Author: Benjamin Otte <otte redhat com>
Date: Tue Feb 12 16:31:03 2013 +0100
x11: Add debugging output for xsettings code
gdk/x11/xsettings-client.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index 3920bec..803d85f 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -29,6 +29,8 @@
#include <gdk/x11/gdkx11screen.h>
#include <gdk/x11/gdkx11window.h>
+#include <gdkinternals.h>
+
#include <limits.h>
#include <stdio.h>
#include <string.h>
@@ -200,6 +202,8 @@ parse_settings (unsigned char *data,
if (result != XSETTINGS_SUCCESS)
goto out;
+ GDK_NOTE(SETTINGS, g_print("reading %u settings (serial %u byte order %u)\n", n_entries, serial,
buffer.byte_order));
+
for (i = 0; i < n_entries; i++)
{
CARD8 type;
@@ -246,6 +250,7 @@ parse_settings (unsigned char *data,
goto out;
setting->data.v_int = (INT32)v_int;
+ GDK_NOTE(SETTINGS, g_print(" %s = %d\n", setting->name, (gint) setting->data.v_int));
break;
case XSETTINGS_TYPE_STRING:
result = fetch_card32 (&buffer, &v_int);
@@ -266,6 +271,7 @@ parse_settings (unsigned char *data,
setting->data.v_string[v_int] = '\0';
buffer.pos += pad_len;
+ GDK_NOTE(SETTINGS, g_print(" %s = \"%s\"\n", setting->name, setting->data.v_string));
break;
case XSETTINGS_TYPE_COLOR:
result = fetch_ushort (&buffer, &setting->data.v_color.red);
@@ -281,9 +287,13 @@ parse_settings (unsigned char *data,
if (result != XSETTINGS_SUCCESS)
goto out;
+ GDK_NOTE(SETTINGS, g_print(" %s = #%02X%02X%02X%02X\n", setting->name,
+ setting->data.v_color.alpha, setting->data.v_color.red,
+ setting->data.v_color.green, setting->data.v_color.blue));
break;
default:
/* Quietly ignore unknown types */
+ GDK_NOTE(SETTINGS, g_print(" %s = ignored (unknown type %u)\n", setting->name, type));
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]