summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-09-24 12:22:49 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-01-04 16:16:03 +0000
commitdf5958b0757a007b383293bb8239722c123749a3 (patch)
tree9c06495508f9b2c7d3521ae4654d425d471484d0
parent31fb82d59bc4c778c36022f4ac333951d9e7c870 (diff)
Improve clipboard debug output
-rw-r--r--hw/xwin/winclipboard/xevents.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/hw/xwin/winclipboard/xevents.c b/hw/xwin/winclipboard/xevents.c
index 73a48523d..3651061c2 100644
--- a/hw/xwin/winclipboard/xevents.c
+++ b/hw/xwin/winclipboard/xevents.c
@@ -112,6 +112,8 @@ winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms)
if (lastOwnedSelectionIndex == CLIP_OWN_NONE)
return None;
+ winDebug("GetLastOwnedSelectionAtom: selection %s owned by XID %x\n", szSelectionNames[lastOwnedSelectionIndex], s_iOwners[lastOwnedSelectionIndex]);
+
if (lastOwnedSelectionIndex == CLIP_OWN_PRIMARY)
return XA_PRIMARY;
@@ -182,12 +184,14 @@ winClipboardFlushXEvents(HWND hwnd,
{
char *pszAtomName = NULL;
- winDebug("SelectionRequest - target %d\n",
- event.xselectionrequest.target);
+ pszAtomName = XGetAtomName(pDisplay,
+ event.xselectionrequest.selection);
+ winDebug("winClipboardFlushXEvents - SelectionRequest - Selection: %s\n", pszAtomName);
+ XFree(pszAtomName);
pszAtomName = XGetAtomName(pDisplay,
event.xselectionrequest.target);
- winDebug("SelectionRequest - Target atom name %s\n", pszAtomName);
+ winDebug("winClipboardFlushXEvents - SelectionRequest - Target %d = %s\n", event.xselectionrequest.target, pszAtomName);
XFree(pszAtomName);
pszAtomName = NULL;
}
@@ -209,7 +213,7 @@ winClipboardFlushXEvents(HWND hwnd,
atomUTF8String,
XA_STRING
};
- winDebug("SelectionRequest - populating targets\n");
+ winDebug("winClipboardFlushXEvents - SelectionRequest - populating targets\n");
/* Try to change the property */
iReturn = XChangeProperty(pDisplay,
@@ -455,7 +459,7 @@ winClipboardFlushXEvents(HWND hwnd,
* client when we abort.
*/
if (fAbort) {
- winDebug("SelectionRequest - aborting\n");
+ winDebug("winClipboardFlushXEvents - SelectionRequest - aborting\n");
/* Setup selection notify event */
eventSelection.type = SelectionNotify;
eventSelection.send_event = True;
@@ -776,7 +780,7 @@ winClipboardFlushXEvents(HWND hwnd,
return WIN_XEVENTS_NOTIFY;
case SelectionClear:
- winDebug("SelectionClear - doing nothing\n");
+ winDebug("winClipboardFlushXEvents - SelectionClear - doing nothing\n");
break;
case PropertyNotify:
@@ -784,8 +788,9 @@ winClipboardFlushXEvents(HWND hwnd,
char *pszAtomName;
pszAtomName = XGetAtomName(pDisplay, event.xproperty.atom);
- winDebug("winClipboardFlushXEvents - PropertyNotify - ATOM: %s\n",
- pszAtomName);
+ winDebug("winClipboardFlushXEvents - PropertyNotify - ATOM: %s %s\n",
+ pszAtomName,
+ event.xproperty.state == PropertyNewValue ? "PropertyNewValue" : "PropertyDelete");
XFree(pszAtomName);
}
break;