diff options
| author | Po Lu | 2022-11-12 15:50:43 +0800 |
|---|---|---|
| committer | Po Lu | 2022-11-12 19:01:30 +0800 |
| commit | 25c6bc7a3d3679b26406bbcac33954186db491f2 (patch) | |
| tree | c562bb2c63566d10c922049201303a8a6439231d /src | |
| parent | 75fb59c55e88c69f5dffc94947decdc2e0a9d48c (diff) | |
| download | emacs-25c6bc7a3d3679b26406bbcac33954186db491f2.tar.gz emacs-25c6bc7a3d3679b26406bbcac33954186db491f2.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xselect.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xselect.c b/src/xselect.c index db5c7853e7f..b897894e8e0 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -918,6 +918,13 @@ x_handle_selection_request (struct selection_input_event *event) | |||
| 918 | } | 918 | } |
| 919 | /* Save conversion results */ | 919 | /* Save conversion results */ |
| 920 | lisp_data_to_selection_data (dpyinfo, multprop, &cs); | 920 | lisp_data_to_selection_data (dpyinfo, multprop, &cs); |
| 921 | |||
| 922 | /* If cs.type is ATOM, change it to ATOM_PAIR. This is because | ||
| 923 | the parameters to a MULTIPLE are ATOM_PAIRs. */ | ||
| 924 | |||
| 925 | if (cs.type == XA_ATOM) | ||
| 926 | cs.type = dpyinfo->dpyinfo->Xatom_ATOM_PAIR; | ||
| 927 | |||
| 921 | XChangeProperty (dpyinfo->display, requestor, property, | 928 | XChangeProperty (dpyinfo->display, requestor, property, |
| 922 | cs.type, cs.format, PropModeReplace, | 929 | cs.type, cs.format, PropModeReplace, |
| 923 | cs.data, cs.size); | 930 | cs.data, cs.size); |