mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
taskswitcher: Do not show apps marked as "skipSwitcher"
This commit is contained in:
parent
be7cd5f6ba
commit
85061c3d9f
1 changed files with 12 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|||
|
||||
import org.kde.kwin 3.0 as KWinComponents
|
||||
import org.kde.kwin.private.effects 1.0
|
||||
import org.kde.kitemmodels
|
||||
|
||||
/**
|
||||
* Component that provides a task switcher.
|
||||
|
|
@ -45,7 +46,7 @@ FocusScope {
|
|||
id: desktopModel
|
||||
}
|
||||
|
||||
property var tasksModel: KWinComponents.WindowFilterModel {
|
||||
property var baseTasksModel: KWinComponents.WindowFilterModel {
|
||||
activity: KWinComponents.Workspace.currentActivity
|
||||
desktop: KWinComponents.Workspace.currentDesktop
|
||||
screenName: root.targetScreen.name
|
||||
|
|
@ -57,6 +58,16 @@ FocusScope {
|
|||
~KWinComponents.WindowFilterModel.CriticalNotification
|
||||
}
|
||||
|
||||
property var tasksModel: KSortFilterProxyModel {
|
||||
sourceModel: baseTasksModel
|
||||
filterRoleName: 'skipSwitcher'
|
||||
filterRowCallback: function(source_row, source_parent) {
|
||||
const window = sourceModel.data(sourceModel.index(source_row, 0, source_parent), Qt.DisplayRole);
|
||||
// ensure apps marked to skip the task switcher are skipped (ex. xwaylandvideobridge)
|
||||
return !window.skipSwitcher;
|
||||
}
|
||||
}
|
||||
|
||||
readonly property int tasksCount: taskList.count
|
||||
|
||||
// keep track of task list events
|
||||
|
|
|
|||
Loading…
Reference in a new issue