astrand / xclip

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

ICCCM compliance: do not use CurrentTime #90

Open hackerb9 opened 3 years ago

hackerb9 commented 3 years ago

SetSelectionOwner() is supposed to be given a time value that will be reused later. For that reason, we should not be using "CurrentTime". To do so, however, ICCCM suggests do a zero-length append to a property and then check the time on the event we receive. We can do that, but it seems rather a silly way to ask the X Server what the time is. Is there a simpler way to do it that doesn't rely on any X libraries we aren't already using?