astrand / xclip

Command line interface to the X11 clipboard
GNU General Public License v2.0
1.04k stars 75 forks source link

Fix the issue #64 #71

Closed hwangcc23 closed 4 years ago

hwangcc23 commented 4 years ago

Fix the issue #64(https://github.com/astrand/xclip/issues/64).

When receiving a SelectionClear event (i.e; lose the selection), the while loop for checking dloop as-is ran endlessly if sloop is set to -1 (a.k.a unlimited number of requests). This caused xclip fail to exist when it loses the selection.

Fix the problem via checking whether there is any in-progress transfer. If no, force xclip exist.

hackerb9 commented 4 years ago

I merged this into my own repository and tested it (by running the improved xctest) and it is now exiting correctly. Thank you, Hwang!

hwangcc23 commented 4 years ago

@astrand Could you review this patch and merge it? hackerb9 had verified it. Thanks.

astrand commented 4 years ago

Will merge if this is improved:

hwangcc23 commented 4 years ago

@astrand Done the improvement. Please help review it. Thanks.

astrand commented 4 years ago

Merged now, thanks.