Avoid sending data offers from an invalid source.
ClosedPublic

Authored by davidedmundson on Aug 14 2017, 11:47 PM.

Details

Summary

A DataDevice will have a source when offers are available, but it can
also be legitimately cleared.

When calling DataDeviceInterface::sendSelection(DataDeviceInterface
*other) if the other data device has no source, we should be setting
that we also have no source.

In addition this also guards against Seat tracking a DataDeviceInterface
with no source when trying to sync x clipboards.

BUG: 383054

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.
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
graesslin added inline comments.
src/server/datadevice_interface.cpp
206

please use a dedicated line for the return here.

Split into two lines

Restricted Application edited projects, added Plasma; removed Plasma on Wayland. · View Herald TranscriptAug 15 2017, 11:17 PM
davidedmundson marked an inline comment as done.Aug 15 2017, 11:17 PM
graesslin accepted this revision.Aug 16 2017, 4:00 PM

Nevertheless I still think we should also ship my review. Rather a null check too many than too few.

This revision is now accepted and ready to land.Aug 16 2017, 4:00 PM
This revision was automatically updated to reflect the committed changes.