Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P Plasma Workspace
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 125
    • Merge requests 125
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • Plasma Workspace
  • Merge requests
  • !2684

klipper: Insert items before remove

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged David Redondo requested to merge work/davidre/insertthenremove into master Mar 01, 2023
  • Overview 1
  • Commits 2
  • Pipelines 5
  • Changes 1

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. BUG:466041 FIXED-IN:5.27.3
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/davidre/insertthenremove