Skip to content

wayland: Avoid klipper loop with existing but empty clipboards

David Edmundson requested to merge work/d_ed/klipper_stop_please into master

In default settings if the clipboard or selection is empty klipper will try to replace it with cached data.

To avoid an occurring race condition if a client deletes and then recreates a selection kwin will deny klipper if another mimedata is present at the time it tried to replace an empty clipboard.

Klipper also considers the presence of a valid mime data without any offers to be an empty clipboard, whereas kwin did not.

If a super weird client set the clipboard to a valid entry with no offers, klipper would get into an infinite loop of trying to set it's own selection for it to be continually denied with no other valid offer from klipper's perspective ever received.

BUG: 489644

Edited by David Edmundson

Merge request reports