Skip to content

applets/showdesktop: Minimize All in LRU order

Christoph Wolk requested to merge work/cherry-pick-a40dee98 into Plasma/6.2

The Minimize all order currently walks through the windows in an unsorted manner and requests minimization of each applicable window. This can lead to a race condition if the order is unfortunate and the requested minimizing happens after the applet is set to active (and thus listening for windows that recieve focus). If focus is briefly passed to another window then, the list of minimized windows is cleared, and the minimized windows can no longer be restored by clicking the applet again.

This change makes the applet instead walk through the list in least recently used order, so that the window with focus is requested to minimize last, and therefore no other window receives focus briefly before it minimizes itself. This way, the ability to restore windows consistently works, rather than only sometimes.

(cherry picked from commit a40dee98)

Co-authored-by: Christoph Wolk christoph.wolk@gmx.de

Merge request reports