diff --git a/platform/CXWindowsClipboard.cpp b/platform/CXWindowsClipboard.cpp index 1168247a..df6a377f 100644 --- a/platform/CXWindowsClipboard.cpp +++ b/platform/CXWindowsClipboard.cpp @@ -30,6 +30,7 @@ CXWindowsClipboard::CXWindowsClipboard(Display* display, m_atomMultiple = XInternAtom(m_display, "MULTIPLE", False); m_atomTimestamp = XInternAtom(m_display, "TIMESTAMP", False); m_atomInteger = XInternAtom(m_display, "INTEGER", False); + m_atomAtom = XInternAtom(m_display, "ATOM", False); m_atomAtomPair = XInternAtom(m_display, "ATOM_PAIR", False); m_atomData = XInternAtom(m_display, "CLIP_TEMPORARY", False); m_atomINCR = XInternAtom(m_display, "INCR", False); @@ -476,7 +477,8 @@ CXWindowsClipboard::icccmFillCache() const Atom atomTargets = m_atomTargets; Atom target; CString data; - if (!icccmGetSelection(atomTargets, &target, &data)) { + if (!icccmGetSelection(atomTargets, &target, &data) || + target != m_atomAtom) { log((CLOG_DEBUG1 "selection doesn't support TARGETS")); data = ""; @@ -1156,7 +1158,7 @@ CXWindowsClipboard::getTargetsData(CString& data, int* format) const } *format = 32; - return m_atomTargets; + return m_atomAtom; } Atom diff --git a/platform/CXWindowsClipboard.h b/platform/CXWindowsClipboard.h index 7c1a7d6e..f32ad0d0 100644 --- a/platform/CXWindowsClipboard.h +++ b/platform/CXWindowsClipboard.h @@ -271,6 +271,7 @@ private: Atom m_atomMultiple; Atom m_atomTimestamp; Atom m_atomInteger; + Atom m_atomAtom; Atom m_atomAtomPair; Atom m_atomData; Atom m_atomINCR;