simon-git: xclipglue (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri Apr 17 20:04:52 BST 2020
TL;DR:
ee9053e Warning fix: spurious non-void return type.
e26419b Fix missing return values in decode_prop.
6f3a367 Fix embarrassing coding goof in handle_property_notify.
c4ebeaa Fix termination when stdin closes.
29532a4 Fix deadlock if one event handler triggers another event.
e1ed562 Fix overly synchronous implementation of INCR receiver.
Repository: https://git.tartarus.org/simon/xclipglue.git
On the web: https://git.tartarus.org/?p=simon/xclipglue.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2020-04-17 20:04:52
commit ee9053ed421030c07846cbbabb1df64b9d81750e
web diff https://git.tartarus.org/?p=simon/xclipglue.git;a=commitdiff;h=ee9053ed421030c07846cbbabb1df64b9d81750e;hp=416e28cd93a0ed924b53d0ac73579d221abcd4cd
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 17 19:06:11 2020 +0100
Warning fix: spurious non-void return type.
xclipglue.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit e26419bf2acbafe3dd67364e432f1b034d709014
web diff https://git.tartarus.org/?p=simon/xclipglue.git;a=commitdiff;h=e26419bf2acbafe3dd67364e432f1b034d709014;hp=ee9053ed421030c07846cbbabb1df64b9d81750e
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 17 19:06:24 2020 +0100
Fix missing return values in decode_prop.
xclipglue.cpp | 6 ++++++
1 file changed, 6 insertions(+)
commit 6f3a3672881b4e22d5d224482a74624728e8c5a0
web diff https://git.tartarus.org/?p=simon/xclipglue.git;a=commitdiff;h=6f3a3672881b4e22d5d224482a74624728e8c5a0;hp=e26419bf2acbafe3dd67364e432f1b034d709014
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 17 19:58:06 2020 +0100
Fix embarrassing coding goof in handle_property_notify.
My aim was to search a map<window,stuff> for a given window, and
presumably because I was concentrating on something else at the time,
I absentmindedly wrote a loop over the whole map checking the keys one
by one. But the whole point of a map is that you can directly look up
the key you wanted! Switch to doing that instead.
xclipglue.cpp | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
commit c4ebeaab0a6e910b7675aa758538ef65140de9b7
web diff https://git.tartarus.org/?p=simon/xclipglue.git;a=commitdiff;h=c4ebeaab0a6e910b7675aa758538ef65140de9b7;hp=6f3a3672881b4e22d5d224482a74624728e8c5a0
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 17 19:51:37 2020 +0100
Fix termination when stdin closes.
I claimed in commit de628c75eb that that worked. But I just saw it not
work, because poll was reporting POLLHUP for the pipe that was at EOF,
and I was checking only for things that weren't POLLHUP.
Possibly I just eyeballed the code and saw that it _looked_ as if it
worked. Oh well.
xclipglue.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 29532a4631510b18447278df68d0e9182c5eed7f
web diff https://git.tartarus.org/?p=simon/xclipglue.git;a=commitdiff;h=29532a4631510b18447278df68d0e9182c5eed7f;hp=c4ebeaab0a6e910b7675aa758538ef65140de9b7
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 17 20:03:25 2020 +0100
Fix deadlock if one event handler triggers another event.
In mainloop(), we go through the queue of events and handle them all,
and then we immediately go back to polling with no timeout. But what
if handling one of those events caused another event to end up on our
queue? We need to re-check that before the poll, and not block if we
already know there's something useful we can be doing.
xclipglue.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit e1ed56244e383b19c80537e7d2dfbef918840141
web diff https://git.tartarus.org/?p=simon/xclipglue.git;a=commitdiff;h=e1ed56244e383b19c80537e7d2dfbef918840141;hp=29532a4631510b18447278df68d0e9182c5eed7f
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 17 19:07:15 2020 +0100
Fix overly synchronous implementation of INCR receiver.
Now, if we get an INCR transfer from the real selection owner, we
record that it's in progress and return to the main event loop to
await the rest of the data. So if the selection owner is a slow or
buggy X client, independent transfers of other selections aren't
blocked.
Also, in passing, this fixes a bug in which we were accidentally
trusting the data length value returned in the original INCR property,
whereas in fact ICCCM says that's only approximate and we should keep
reading data until we see a zero-length transfer signalling EOF.
xclipglue.but | 8 ---
xclipglue.cpp | 158 +++++++++++++++++++++++++++++++++++++---------------------
2 files changed, 101 insertions(+), 65 deletions(-)
More information about the tartarus-commits
mailing list