Commit 3697f451 authored by David Edmundson's avatar David Edmundson
Browse files

Fix minimise all applet on wayland with an active window

Summary:
There's an async round trip after requesting isMinimized to kwin and
then back to Plasma with the updated roles.

There's a quirk on wayland that IsActive will update before we get
isMinimized changed. The old code would see that a window is currently
not minimised and deactivate the effect.

This patch checks the roles to only check after IsMinimized changes.

Test Plan: More clicking

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11133
parent 29c23ecb
......@@ -96,6 +96,9 @@ Item {
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();
......
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