From 036b72575a073d43552fd75a435c6388afe95348 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 26 May 2022 14:37:27 +0800 Subject: [PATCH] Fix the `x_trace_wire' option * src/xterm.c (x_trace_wire): (x_term_init): Fix debugging code for modern C and Xlib. --- src/xterm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index cde98b43b45..9826f2fbd85 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -21236,9 +21236,12 @@ x_fully_uncatch_errors (void) #if false static unsigned int x_wire_count; -x_trace_wire (void) + +static int +x_trace_wire (Display *dpy) { - fprintf (stderr, "Lib call: %d\n", ++x_wire_count); + fprintf (stderr, "Lib call: %u\n", ++x_wire_count); + return 0; } #endif @@ -24488,7 +24491,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) terminal->name = xlispstrdup (display_name); #if false - XSetAfterFunction (x_current_display, x_trace_wire); + XSetAfterFunction (dpyinfo->display, x_trace_wire); #endif Lisp_Object system_name = Fsystem_name (); -- 2.39.2