From: simon Date: Sat, 12 Feb 2011 16:45:58 +0000 (+0000) Subject: Don't quit in the middle of transferring an incremental selection. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/utils/commitdiff_plain/f8381827382941d2868dae6ea4fb8d92489f8c5d Don't quit in the middle of transferring an incremental selection. (ICCCM 2.2) git-svn-id: svn://svn.tartarus.org/sgt/utils@9089 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/xcopy/xcopy.c b/xcopy/xcopy.c index 1c030b3..da1f6ac 100644 --- a/xcopy/xcopy.c +++ b/xcopy/xcopy.c @@ -610,10 +610,13 @@ void run_X(void) { return; } } else { + int exiting = False; + switch (ev.type) { case SelectionClear: /* Selection has been cleared by another app. */ - return; + exiting = True; + break; case SelectionRequest: e2.xselection.type = SelectionNotify; e2.xselection.requestor = ev.xselectionrequest.requestor; @@ -664,6 +667,8 @@ void run_X(void) { nincrs = j; break; } + if (nincrs == 0 && exiting) + return; } } }