summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-10-21 17:26:18 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2015-02-08 15:11:54 +0000
commit6be20f1c90aa0fdb8cd7d198a7a23eb590a29853 (patch)
treefa1438473c8cb5e889bcf81c1113697a0a12dae2
parentb9aa05a7f06d21218485bcdb08413aec2afdf618 (diff)
clipboard debug: Dump clipboard formats when GetClipboardData() failsclipboard-debug-for-1.17
-rw-r--r--hw/xwin/winclipboard/xevents.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/xwin/winclipboard/xevents.c b/hw/xwin/winclipboard/xevents.c
index d196a7246..312955186 100644
--- a/hw/xwin/winclipboard/xevents.c
+++ b/hw/xwin/winclipboard/xevents.c
@@ -385,9 +385,29 @@ winClipboardFlushXEvents(HWND hwnd,
hGlobal = GetClipboardData(CF_TEXT);
}
if (!hGlobal) {
+ unsigned int format = 0;
+
ErrorF("winClipboardFlushXEvents - SelectionRequest - "
"GetClipboardData () failed: %08lx\n", GetLastError());
+ do {
+ format = EnumClipboardFormats(format);
+ if (GetLastError() != ERROR_SUCCESS) {
+ winDebug
+ ("winClipboardFlushXEvents - SelectionRequest - EnumClipboardFormats failed %x\n",
+ GetLastError());
+ }
+ if (format > 0xc000) {
+ char buff[256];
+
+ GetClipboardFormatName(format, buff, 256);
+ winDebug("winClipboardFlushXEvents - SelectionRequest - %d %s\n", format,
+ buff);
+ }
+ else if (format > 0)
+ winDebug("winClipboardFlushXEvents - SelectionRequest - %d\n", format);
+ } while (format != 0);
+
/* Abort */
fAbort = TRUE;
goto winClipboardFlushXEvents_SelectionRequest_Done;