diff options
| author | Po Lu <luangruo@yahoo.com> | 2022-03-07 13:09:07 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2022-03-07 13:09:41 +0800 |
| commit | 03b07fd62e831df2425676005bd962fef81ffc1d (patch) | |
| tree | bccd7ce1aa3b63b1bd49a301e771904a471b76a3 /src | |
| parent | 532472220268fb9852b65d60503a446c9e5e57ab (diff) | |
Fix maximum selection size reporting
* src/xselect.c (selection_quantum): Take into account extended
request size.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xselect.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xselect.c b/src/xselect.c index 979f4549488..a88c15aa95b 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -98,7 +98,11 @@ static void lisp_data_to_selection_data (struct x_display_info *, Lisp_Object, static int selection_quantum (Display *display) { - long mrs = XMaxRequestSize (display); + long mrs = XExtendedMaxRequestSize (display); + + if (!mrs) + mrs = XMaxRequestSize (display); + return (mrs < MAX_SELECTION_QUANTUM / X_LONG_SIZE + 25 ? (mrs - 25) * X_LONG_SIZE : MAX_SELECTION_QUANTUM); |
