emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 25c6bc7a3d 1/3: Fix implementation of MULTIPLE


From: Po Lu
Subject: master 25c6bc7a3d 1/3: Fix implementation of MULTIPLE
Date: Sat, 12 Nov 2022 06:01:42 -0500 (EST)

branch: master
commit 25c6bc7a3d3679b26406bbcac33954186db491f2
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix implementation of MULTIPLE
    
    * src/xselect.c (x_handle_selection_request): Make sure the type
    of a reply to a MULTIPLE request is ATOM_PAIR.
---
 src/xselect.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/xselect.c b/src/xselect.c
index db5c7853e7..b897894e8e 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -918,6 +918,13 @@ x_handle_selection_request (struct selection_input_event 
*event)
        }
       /* Save conversion results */
       lisp_data_to_selection_data (dpyinfo, multprop, &cs);
+
+      /* If cs.type is ATOM, change it to ATOM_PAIR.  This is because
+        the parameters to a MULTIPLE are ATOM_PAIRs.  */
+
+      if (cs.type == XA_ATOM)
+       cs.type = dpyinfo->dpyinfo->Xatom_ATOM_PAIR;
+
       XChangeProperty (dpyinfo->display, requestor, property,
                       cs.type, cs.format, PropModeReplace,
                       cs.data, cs.size);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]