diff options
author | Jim Blandy <[email protected]> | 1992-07-22 16:15:36 +0000 |
---|---|---|
committer | Jim Blandy <[email protected]> | 1992-07-22 16:15:36 +0000 |
commit | 434e6714820315c7e27ec615b0c9b8ab32435e7f (patch) | |
tree | 0e20c82e2a82d6813c59a1df57559769057a0f8a /src/xselect.c.old | |
parent | 3a801d0c71755fad1c33585e7ed54d9dc240999c (diff) |
entered into RCS
Diffstat (limited to 'src/xselect.c.old')
-rw-r--r-- | src/xselect.c.old | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/xselect.c.old b/src/xselect.c.old index cb7697270c..7123759433 100644 --- a/src/xselect.c.old +++ b/src/xselect.c.old @@ -193,11 +193,27 @@ use X selections.") } else if (EQ (type, Qcut_buffer0)) { + /* DECwindows and some other servers don't seem to like setting + properties to values larger than about 20k. For very large + values, they signal an error, but for intermediate values + they just seem to hang. + + We could just truncate the request, but it's better to let + the user know that the strategy he/she's using isn't going to + work than to have it work partially, but incorrectly. */ BLOCK_INPUT; - XStoreBytes (x_current_display, - (char *) XSTRING (string)->data, - XSTRING (string)->size); - val = string; + if (XSTRING (string)->size > MAX_SELECTION (x_current_display)) + { + XStoreBytes (x_current_display, (char *) 0, 0); + val = Qnil; + } + else + { + XStoreBytes (x_current_display, + (char *) XSTRING (string)->data, + XSTRING (string)->size); + val = string; + } UNBLOCK_INPUT; } else |