From a3dc63d738bc1955d260ccb34c33221d35f02565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Wed, 23 Nov 2011 12:36:36 -0500 Subject: [PATCH] xfreerdp: added more cliprdr debug output, identified failure point --- client/X11/xf_cliprdr.c | 11 ++++++++--- cmake/ConfigOptions.cmake | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 09a7f0b8a..e32e4b123 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -1086,7 +1086,7 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) if (xevent->xselectionrequest.owner != xfi->drawable) { - DEBUG_X11("not owner"); + DEBUG_X11_CLIPRDR("not owner"); return false; } @@ -1103,16 +1103,21 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) if (xevent->xselectionrequest.target == cb->targets[0]) /* TIMESTAMP */ { /* TODO */ + DEBUG_X11_CLIPRDR("target: TIMESTAMP (unimplemented)"); } else if (xevent->xselectionrequest.target == cb->targets[1]) /* TARGETS */ { /* Someone else requests our available formats */ + DEBUG_X11_CLIPRDR("target: TARGETS"); respond->xselection.property = xevent->xselectionrequest.property; xf_cliprdr_provide_targets(xfi, respond); } else { + DEBUG_X11_CLIPRDR("target: other"); + i = xf_cliprdr_select_format_by_atom(cb, xevent->xselectionrequest.target); + if (i >= 0 && xevent->xselectionrequest.requestor != xfi->drawable) { format = cb->format_mappings[i].format_id; @@ -1123,7 +1128,7 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) cb->property_atom, 0, 4, 0, XA_INTEGER, &type, &fmt, &length, &bytes_left, &data) != Success) { - DEBUG_X11("XGetWindowProperty failed"); + DEBUG_X11_CLIPRDR("XGetWindowProperty failed"); } if (data) { @@ -1140,7 +1145,7 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) } else if (cb->respond) { - DEBUG_X11("duplicated request"); + DEBUG_X11_CLIPRDR("duplicated request"); } else { diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 64ea5acf1..9157a25d6 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -21,4 +21,4 @@ option(WITH_PROFILER "Compile profiler." OFF) option(WITH_SSE2 "Use SSE2 optimization." OFF) option(WITH_SSE2_TARGET "Allow compiler to generate SSE2 instructions." OFF) option(WITH_DEBUG_REDIR "Redirection debug messages" OFF) -option(WITH_DEBUG_CLIPRDR, "Print clipboard redirection debug messages" OFF) +option(WITH_DEBUG_CLIPRDR "Print clipboard redirection debug messages" OFF)