taskpanel: Fix close action

This commit is contained in:
Devin Lin 2022-02-12 09:36:34 -05:00
parent cdb0c91236
commit 3453760dd3

View file

@ -139,14 +139,14 @@ PlasmaCore.ColorScope {
} else if (taskSwitcher.visible) { } else if (taskSwitcher.visible) {
// if task switcher is open, close the current window shown // if task switcher is open, close the current window shown
taskSwitcher.model.requestClose(taskSwitcher.model.index(taskSwitcher.currentTaskIndex, 0)); taskSwitcher.tasksModel.requestClose(taskSwitcher.tasksModel.index(taskSwitcher.currentTaskIndex, 0));
} else if (plasmoid.nativeInterface.hasCloseableActiveWindow) { } else if (plasmoid.nativeInterface.hasCloseableActiveWindow) {
// if task switcher is closed, but there is an active window // if task switcher is closed, but there is an active window
var index = taskSwitcher.model.activeTask; var index = taskSwitcher.tasksModel.activeTask;
if (index) { if (index) {
taskSwitcher.model.requestClose(index); taskSwitcher.tasksModel.requestClose(index);
} }
} }
} }