I am pretty much exhausted all the possibilities of finding an X11 API to perform the following thing.
I have a thread which is trying to monitor for an event or notification to know when anything is copied into clipboard by any X11 client
. I do not want to monitor a specific Atom Target (clipboard format), but generally looking for changes in clipboards.
Once, I know that something has changed in the clipboard, I can dive in and perform XConvertSelection()
on all the target formats (I want to request server
to give me all the possible ways to convert the copied data), and futher process them into SelectionRequest
event.
Again, I want to generally get request for all the formats (thinking to enumerate between 1 to 1000 to check target Atoms), and not register changes for one specific format. Based on response from the server, if a particular atom is absent, I can check None
as the property member, or else store other target Atom Names in a list.
Can anyone help me with how to monitor for changes in Clipboard? Also, does iterating 1 to 1000 will guarantee exhaustive search of all possible format? Or is there a better way to do just that?