diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-02-13 18:38:14 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-04-01 12:12:44 +0100 |
commit | fa93301a120e3ac8f602205f81002837ff869791 (patch) | |
tree | e07320aadad5e8a3a5e0311a79e3e3f98e2ae3d9 | |
parent | 3caa0f0eaf8d06887b1c0be288802e81ba03bee0 (diff) |
Move property retrieval to PropertyNotify, so we can be sure it has been set
-rw-r--r-- | hw/xwin/winclipboardxevents.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c index 6e9aaaff2..d34707a1b 100644 --- a/hw/xwin/winclipboardxevents.c +++ b/hw/xwin/winclipboardxevents.c @@ -521,6 +521,21 @@ winClipboardFlushXEvents (HWND hwnd, } } + case SelectionClear: + winDebug("SelectionClear - doing nothing\n"); + break; + + case PropertyNotify: + { + char *pszAtomName; + pszAtomName = XGetAtomName (pDisplay, event.xproperty.atom); + winDebug("winClipboardFlushXEvents - SelectionNotify - ATOM: %s\n", pszAtomName); + XFree (pszAtomName); + } + + if (event.xproperty.atom != atomLocalProperty) + break; + /* Retrieve the size of the stored data */ iReturn = XGetWindowProperty (pDisplay, iWindow, @@ -778,19 +793,6 @@ winClipboardFlushXEvents (HWND hwnd, } return WIN_XEVENTS_NOTIFY; - case SelectionClear: - winDebug("SelectionClear - doing nothing\n"); - break; - - case PropertyNotify: - { - char *pszAtomName; - pszAtomName = XGetAtomName (pDisplay, event.xproperty.atom); - winDebug("winClipboardFlushXEvents - SelectionNotify - ATOM: %s\n", pszAtomName); - XFree (pszAtomName); - } - break; - case MappingNotify: break; |