Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KWin KWin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 60
    • Issues 60
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 158
    • Merge requests 158
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • 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
  • KWinKWin
  • Merge requests
  • !2786

focus chain/scripting: Make list of most recently used windows public, and expose recently used and stacking order client lists in scripting API

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Natalie Clarius requested to merge nclarius/kwin:expose-recently-used into master Aug 07, 2022
  • Overview 18
  • Commits 5
  • Pipelines 21
  • Changes 3

It would be useful to have the list of windows in the order of recent usage available in the scripting API, rather than just allClientList. This would make it possible to e.g. in the minimize-all widget more reliably restore the windows in the correct order. I also have a use case for this in my Window Overlap Prevention script, where I want to reactivate the most recently used window after restoring some minimized ones.

Make the focus chain's list of recently used windows public, and use this as the clientList in the scripting workspace wrapper.

  • I am unsure if there is some architectural reason why making the focus chain's recently used windows list as a whole accessible from outside was not done in the first place, and piecing it together from the provided nextMostRecentlyUsed like tabbox does it is the way to go?
  • Would it be better to keep the scripting's current clientList, and instead add the list of windows in most recently used order (and while at it, another one in stacking order) as separate functions? I can't really think of a scenario where changing the client list to be ordered by recent usage would break existing scripts' functionality, and if I understand correctly, introducing it as a new feature would make it factually unusable for a long time if script developers want to ensure that their script works with older Plasma versions.

BUG: 409889

Edited Aug 08, 2022 by Natalie Clarius
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: expose-recently-used