https://bugs.kde.org/show_bug.cgi?id=466041

David Redondo <k...@david-redondo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/plasma-workspace/commit/
                   |                            |85a05244ec2ac17dddbb9a4d591
                   |                            |19b784e97ba49
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Version Fixed In|                            |5.27.3

--- Comment #9 from David Redondo <k...@david-redondo.de> ---
Git commit 85a05244ec2ac17dddbb9a4d59119b784e97ba49 by David Redondo.
Committed on 02/03/2023 at 08:15.
Pushed by davidre into branch 'master'.

klipper: Insert items before remove

If the history size is 1 removing before inserting can lead to a,
weird order of event:
- the clipboard is changed externally
- klipper is notified and insert is called
- the only item is removed since count == m_maxSize
- klipper notices the history is empty and clears the clipboard and selection
- adds the new item
- execution continues and klipper is notified selection is now empty
- to prevent empty  selection klipper sets it back to the new item
- same happens for the clipboard
This causes an issue on Wayland since klipper is notified about the
clipboard being empty while setting the selection and ignores the change, so
it is never set back. Instead do it in a more sensible way add the new
clipboard
content first and then remove the excess item. This way klipper never
unnecessarily
clears clipboard and selection.
FIXED-IN:5.27.3

M  +12   -11   klipper/historymodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/85a05244ec2ac17dddbb9a4d59119b784e97ba49

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to