We can't completely do without GTK because the hooks for X11 events are in the gtk main loop filter, and the events are dispatched as gobject signals.
But at least it should be easier to move away from GTK at some point.

And we also need to use the xfixes API, because it's better.
See also #1494

r22229 undo some of the really ugly original code from 2009! just use native struct formats directly rather than transforming them in the bindings

r22230 split clipboard base class so we can re-use the higher level logic without the low-level gtk bits

TODO:

rename private fields so the helper can access them without triggering warnings, ie: _can_send

handle COMPOUND_TEXT?

move code to proxy: local_to_remote?

XGetWindowProperty needs to handle large data (continue) - HARD!

do_owner_changed() should fire a new token every time? for greedy clients only?

emit_token needs to get TARGETS and the data before sending

we use the TARGET as part of the property name and maybe we shouldn't: in some cases the property name ends up looking like this: PRIMARY-text/plain;charset=utf-8 - is this always going to be a valid property name? could this be abused?

the same request can timeout in two places: the remote request timeout, remotely when the remote client takes too long. Both can trigger warning and delete the request_id..

​Unblocking Clipboard Access: There are more generic read() and write() methods in the specification, but these come with additional implementation complexity and security concerns (remember those image bombs?). For now, Chrome is rolling out the simpler text parts of the API. - we can deal with the image bombs by using the pillow image filter