Workaround for old clients not specifying a receiving property atom
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 12 Feb 2011 16:43:12 +0000 (16:43 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 12 Feb 2011 16:43:12 +0000 (16:43 +0000)
that I just found in ICCCM.

git-svn-id: svn://svn.tartarus.org/sgt/utils@9088 cda61777-01e9-0310-a592-d414129be87e

xcopy/xcopy.c

index 2ee43c6..1c030b3 100644 (file)
@@ -519,6 +519,16 @@ Atom convert_sel_inner(Window requestor, Atom target, Atom property) {
 }
 
 Atom convert_sel_outer(Window requestor, Atom target, Atom property) {
+    /*
+     * ICCCM 2.2 says that obsolete clients requesting the selection
+     * request may not specify a property name under which they want
+     * the data written to their window; selection owners are
+     * encouraged to support such clients by reusing the selection
+     * target name as the property.
+     */
+    if (property == None)
+        property = target;
+
     if (target == multiple_atom) {
        /*
         * Support for the MULTIPLE selection type, since it's