Verified Commit 797bd80d authored by ivan tkachenko's avatar ivan tkachenko
Browse files

effects/windowview: Turn placeholder on when there are actually no visible windows

This may happen when all windows are minimized, and the effect was
started in "Window class on current desktop" mode (Ctrl+F7).

BUG: 459244
FIXED-IN: 5.26
(cherry picked from commit 8ac49010)
parent 78a15027
......@@ -26,6 +26,16 @@ FocusScope {
property alias model: windowsRepeater.model
property alias delegate: windowsRepeater.delegate
readonly property alias count: windowsRepeater.count
readonly property bool activeEmpty: {
var children = expoLayout.visibleChildren;
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child instanceof WindowHeapDelegate && !child.activeHidden) {
return false;
}
}
return true;
}
property alias layout: expoLayout
property int selectedIndex: -1
......
/*
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-FileCopyrightText: 2022 ivan tkachenko <me@ratijas.tk>
SPDX-License-Identifier: GPL-2.0-or-later
*/
......@@ -92,7 +93,7 @@ Item {
PlasmaExtras.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - (PlasmaCore.Units.gridUnit * 8)
visible: heap.count === 0
visible: heap.activeEmpty
iconName: "edit-none"
text: effect.searchText.length > 0 ? i18nd("kwin_effects", "No Matches") : i18nd("kwin_effects", "No Windows")
}
......
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