Do not cancel old clipboard selection if it is same as the new one.

Authored by michalsrb on Jun 14 2018, 12:21 PM.

Description

Do not cancel old clipboard selection if it is same as the new one.

Summary:
GTK applications seem to call wl_data_device::set_selection multiple times with
the same wl_data_source object, replacing it with itself. If we cancel it, they
will destroy it and the selection will be gone.

With this patch it is again possible to copy from GTK applications.

BUG: 395366

Test Plan: Patch provided by the reporter, he reported success.

Reviewers: Plasma, Frameworks, romangg

Reviewed By: Plasma, romangg

Subscribers: michalsrb, romangg, graesslin, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D13535

Details