Most of the groundwork related to selections is already present in TxWindow. And XDesktop already makes use of XFixes, which can provide a notification whenever selection changes. I have added XSelection to handle the rest (took some notes from vncSelection.c in Xvnc).
Only CLIPBOARD selection is handled for now (because I don't personally use PRIMARY). Is this sufficient?
When notified about selection change, current implementation will immediately ask for clip-data from selection owner, and will then notify VNC clients. It simplifies things a bit and in most configurations net outcome is the same , but vncSelection.c seems to only request data from selection owner when explicitly asked by clients in handleClipboardRequest().
I didn't want to make it too complicated before getting some feedback.
Most of the groundwork related to selections is already present in
TxWindow
. AndXDesktop
already makes use of XFixes, which can provide a notification whenever selection changes. I have addedXSelection
to handle the rest (took some notes fromvncSelection.c
in Xvnc).CLIPBOARD
selection is handled for now (because I don't personally usePRIMARY
). Is this sufficient?vncSelection.c
seems to only request data from selection owner when explicitly asked by clients inhandleClipboardRequest()
.I didn't want to make it too complicated before getting some feedback.
Issue: #529