diff options
author | tv <tv@krebsco.de> | 2019-01-31 10:42:44 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-01-31 10:42:44 +0100 |
commit | 15f3f94c19fb873e3687c07a3056921ade5266fa (patch) | |
tree | a9b4bb19dd9148df91d181667d4917aa1d66249d /src/screen.C | |
parent | e70616a923c8f6d4d0da1581cbdf7080e6f34ad1 (diff) |
cancel running selection requestcancel-running-selection-request
When using X security extensions to run urxvt as trusted X client and
requesting a selection from an untrusted client, then no X event will be
received, but the selection request will timeout instead. This patch
cancels any running request before creating a new one, so that the user
doesn't have to wait 10 seconds for the timeout before being able to
initiate a new one.
Diffstat (limited to 'src/screen.C')
-rw-r--r-- | src/screen.C | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/screen.C b/src/screen.C index f3c6d57..75b38d7 100644 --- a/src/screen.C +++ b/src/screen.C @@ -2744,11 +2744,11 @@ rxvt_term::paste (char *data, unsigned int len) NOTHROW void rxvt_term::selection_request (Time tm, int selnum) NOTHROW { - if (!selection_req) - { - selection_req = new rxvt_selection (display, selnum, tm, vt, xa[XA_VT_SELECTION], this); - selection_req->run (); - } + if (selection_req) + selection_req->finish (); + + selection_req = new rxvt_selection (display, selnum, tm, vt, xa[XA_VT_SELECTION], this); + selection_req->run (); } /* ------------------------------------------------------------------------- */ |