summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-11-04 00:56:12 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-11-04 00:56:12 +0000
commite0a4c2a1df6e4c8cba389ac77caf65180f54a01a (patch)
treea796fa5018ab907deb7598d2316408b7a9aab4ee /src/util.c
parent9feebc05c799190fa5ff699dd3f358b2d6c95eee (diff)
downloadmetacity-e0a4c2a1df6e4c8cba389ac77caf65180f54a01a.tar.gz
metacity-e0a4c2a1df6e4c8cba389ac77caf65180f54a01a.tar.bz2
remove XSync calls from here (meta_display_ungrab): remove XSync from
2002-11-03 Havoc Pennington <hp@pobox.com> * src/display.c (meta_display_grab): remove XSync calls from here (meta_display_ungrab): remove XSync from here, but put in an XFlush to be sure we get the ungrab sent. * src/util.c (meta_topic): track sync count here * src/errors.c: move sync count out of here Throughout: error spew on all XSync() calls * src/run-metacity.sh: don't set METACITY_DEBUG
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 5d9c68a..8d5a57e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -267,6 +267,8 @@ topic_name (MetaDebugTopic topic)
return "Window manager";
}
+static int sync_count = 0;
+
void
meta_topic (MetaDebugTopic topic,
const char *format,
@@ -281,7 +283,7 @@ meta_topic (MetaDebugTopic topic,
if (!is_verbose)
return;
- va_start (args, format);
+ va_start (args, format);
str = g_strdup_vprintf (format, args);
va_end (args);
@@ -289,6 +291,13 @@ meta_topic (MetaDebugTopic topic,
if (no_prefix == 0)
fprintf (out, "%s: ", topic_name (topic));
+
+ if (topic == META_DEBUG_SYNC)
+ {
+ ++sync_count;
+ fprintf (out, "%d: ", sync_count);
+ }
+
utf8_fputs (str, out);
fflush (out);