Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-sensitive and "greedy" clients #118

Open
jpmg1 opened this issue Mar 12, 2021 · 0 comments
Open

-sensitive and "greedy" clients #118

jpmg1 opened this issue Mar 12, 2021 · 0 comments

Comments

@jpmg1
Copy link

jpmg1 commented Mar 12, 2021

A problem with the current implementation of -sensitive is that a typical X desktop environment nowadays includes multiple applications that automatically request the clipboard as soon as xclip makes it available. (The culprits in my case are xfdesktop and gnome-terminal).
I've re-implemented this slightly, so that there is a window of 50ms immediately after xclip makes the selection available, in which it will return a dummy string to any selection request; only after that does it return the actual content to the next requester, and then shut down.
My current implementation is slightly non-portable (I used timersub() out of laziness), but that's fairly easily worked around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant