Added workaround for broken clipboard owners that report the

type of TARGETS as TARGETS instead of ATOM.
This commit is contained in:
crs 2003-05-26 09:50:35 +00:00
parent af24ae6db7
commit 5a65e36c99
1 changed files with 4 additions and 2 deletions

View File

@ -488,12 +488,14 @@ CXWindowsClipboard::icccmFillCache()
LOG((CLOG_DEBUG "ICCCM fill clipboard %d", m_id)); LOG((CLOG_DEBUG "ICCCM fill clipboard %d", m_id));
// see if we can get the list of available formats from the selection. // see if we can get the list of available formats from the selection.
// if not then use a default list of formats. // if not then use a default list of formats. note that some clipboard
// owners are broken and report TARGETS as the type of the TARGETS data
// instead of the correct type ATOM; allow either.
const Atom atomTargets = m_atomTargets; const Atom atomTargets = m_atomTargets;
Atom target; Atom target;
CString data; CString data;
if (!icccmGetSelection(atomTargets, &target, &data) || if (!icccmGetSelection(atomTargets, &target, &data) ||
target != m_atomAtom) { (target != m_atomAtom && target != m_atomTargets)) {
LOG((CLOG_DEBUG1 "selection doesn't support TARGETS")); LOG((CLOG_DEBUG1 "selection doesn't support TARGETS"));
data = ""; data = "";