Open hackerb9 opened 3 years ago
It may make sense to use the PropertyNotify events to move the state machine in xcin() forward instead of ignoring them. Currently, only PropertyNotify events with evt.state == PropertyDelete are used and only in XCIN_INCR. It is typical to receive evt.state == PropertyNewValue during INCR, but we just ignore them.
Currently, when xclip owns the selection and it finishes sending the data via INCR, xcin() returns 1 to signal that it is done and the requestor should be deleted from our linked list in xclip.c. However, after doing that, xclip immediately recreates the requestor it just deleted after receiving a final PropertyNotify message from the client to let us know that it is finished. We ignore the message, so no harm is done, but it is a silly thing to do.