Commit 70ecec72 authored by David Edmundson's avatar David Edmundson
Browse files

Do not restore windows on minimise change

Summary:
On window changing the old code would deactivate the minimise all
plugin, but not restore the rest of the minised windows. This restores
that behaviour.

Also simplify tracking which active window changes, in a way that still
works when a user clicks minimise all then interacts with the desktop.

BUG: 395519

Patch co-written by Anthony Fieroni.

Test Plan:
Clicked minimise all
Clicked desktop
Clicked minimise all, windows restored

Clicked minimise all
Opened a window
Only that window restored
Clicking minimise all again minimised only that window

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13598
parent 2a6d2112
......@@ -94,15 +94,11 @@ Item {
Connections {
target: tasksModel
enabled: root.active
onDataChanged: {
for (var i = topLeft.row; i <= bottomRight.row ; i++) {
if (! (roles.length == 0 || roles.indexOf(TaskManager.AbstractTasksModel.IsMinimized) > 0)) {
continue;
}
var idx = tasksModel.makeModelIndex(i);
if (!tasksModel.data(idx, TaskManager.AbstractTasksModel.IsMinimized)) {
deactivate();
}
onActiveTaskChanged: {
if (tasksModel.activeTask.valid) { //to supress changing focus to non windows, such as the desktop
root.active = false;
root.minimizedClients = [];
}
}
onVirtualDesktopChanged: deactivate()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment