[PATCH 08/12] Xming: Avoid log spam if a windows application won't provide CF_UNICODETEXT clipboard format

Jon TURNEY jon.turney at dronecode.org.uk
Wed May 20 04:52:26 PDT 2009


From: Colin Harrison <colin.harrison at virgin.net>

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 hw/xwin/winclipboardxevents.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c
index ab8d5e4..0a64ba6 100644
--- a/hw/xwin/winclipboardxevents.c
+++ b/hw/xwin/winclipboardxevents.c
@@ -191,8 +191,13 @@ winClipboardFlushXEvents (HWND hwnd,
 	  if (fUseUnicode
 	      && !IsClipboardFormatAvailable (CF_UNICODETEXT))
 	    {
-	      ErrorF ("winClipboardFlushXEvents - CF_UNICODETEXT is not "
-		      "available from Win32 clipboard.  Aborting.\n");
+	      static int count; /* Hack to stop acroread spamming the log */
+	      static HWND lasthwnd; /* I've not seen any other client get here repeatedly? */
+	      if (hwnd != lasthwnd) count = 0;
+	      count++;
+	      if (count < 6) ErrorF ("winClipboardFlushXEvents - CF_UNICODETEXT is not "
+		      "available from Win32 clipboard.  Aborting %d.\n", count);
+	      lasthwnd = hwnd;
 
 	      /* Abort */
 	      fAbort = TRUE;
-- 
1.6.1.2



More information about the xorg-devel mailing list