Some programs try to request targets even if we don't advertise them as available in TARGETS. When xclip owns the selection, it is supposed to refuse requests for non-existent targets (using a null property message).
Currently, we just send the data we have, willy-nilly, which is definitely the wrong thing to do.
For example, I did xclip -c -t image/jpeg < foo.jpg, then tried pasting an image into this very bug report window using ^V, I ended up with a long string of Unicode gibberish because Firefox had asked xclip for a series of targets: "TARGETS", "text/plain;charset=utf-8", "UTF8_STRING", "COMPOUND_TEXT", "STRING", and finally "text/x-moz-text-internal".
Some programs try to request targets even if we don't advertise them as available in TARGETS. When xclip owns the selection, it is supposed to refuse requests for non-existent targets (using a null property message). Currently, we just send the data we have, willy-nilly, which is definitely the wrong thing to do.
For example, I did
xclip -c -t image/jpeg < foo.jpg
, then tried pasting an image into this very bug report window using ^V, I ended up with a long string of Unicode gibberish because Firefox had asked xclip for a series of targets: "TARGETS", "text/plain;charset=utf-8", "UTF8_STRING", "COMPOUND_TEXT", "STRING", and finally "text/x-moz-text-internal".