[server] When replacing the clipboard selection previous DataSource needs to be cancelled
ClosedPublic

Authored by graesslin on Sep 12 2016, 7:02 AM.

Details

Summary

According to the Wayland documentation a data source needs to be
cancelled whenever it is no longer valid. A reason for no longer being
valid is that the data source has been replaced by another data source.

So far KWayland did not implement this aspect which resulted in clipboard
breaking in QtWayland applications. As soon as one copied once from an
application it was no longer possible to paste to it from another
application.

With this change the data source gets properly cancelled and also
ensured that the server code doesn't run into a possible crash condition
when trying to cancel an already unbound data source.

BUG: 368391

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 6631.Sep 12 2016, 7:02 AM
graesslin retitled this revision from to [server] When replacing the clipboard selection previous DataSource needs to be cancelled.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma on Wayland.
Restricted Application added a project: Plasma on Wayland. · View Herald TranscriptSep 12 2016, 7:02 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas accepted this revision.Sep 13 2016, 3:37 PM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Sep 13 2016, 3:37 PM
This revision was automatically updated to reflect the committed changes.