Added workaround for broken clipboard owners that report the
type of TARGETS as TARGETS instead of ATOM.
This commit is contained in:
parent
af24ae6db7
commit
5a65e36c99
|
@ -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 = "";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue