From fbe9ed27b1c2f932a74aa6ced134ecec021a3fc1 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Thu, 29 Jan 2009 10:55:38 +0000 Subject: [PATCH] Xming: Avoid log spam if a windows application won't provide CF_UNICODETEXT clipboard format Signed-off-by: Jon TURNEY --- hw/xwin/winclipboardxevents.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c index ab8d5e42f..0a64ba6db 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;