mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
plasma: show only the tasks of the current virtual desktop from tasks applet
could be made an option but do I care? Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a4a32d63ec
commit
1aca9ade6a
2 changed files with 8 additions and 1 deletions
|
@ -121,7 +121,7 @@ KTaskAction::KTaskAction(const WId window, const KActionType type,
|
|||
m_window(window)
|
||||
{
|
||||
switch (type) {
|
||||
// unlike the kwin decoration menu the minimize action is checked based on the window task
|
||||
// unlike the kwin decoration menu the minimize action is checked based on the window state
|
||||
// just like maximize is
|
||||
case KTaskAction::ActionMinimize: {
|
||||
connect(this, SIGNAL(triggered()), this, SLOT(slotMinimize()));
|
||||
|
|
|
@ -229,6 +229,10 @@ void TasksApplet::init()
|
|||
KTaskManager::self(), SIGNAL(taskRemoved(KTaskManager::Task)),
|
||||
this, SLOT(slotUpdateLayout())
|
||||
);
|
||||
connect(
|
||||
KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)),
|
||||
this, SLOT(slotUpdateLayout())
|
||||
);
|
||||
}
|
||||
|
||||
void TasksApplet::constraintsEvent(Plasma::Constraints constraints)
|
||||
|
@ -274,6 +278,9 @@ void TasksApplet::slotUpdateLayout()
|
|||
}
|
||||
adjustSize();
|
||||
foreach (const KTaskManager::Task &task, KTaskManager::self()->tasks()) {
|
||||
if (task.desktop != KWindowSystem::currentDesktop()) {
|
||||
continue;
|
||||
}
|
||||
TasksSvg* taskssvg = new TasksSvg(task, this);
|
||||
taskssvg->setOrientation(m_layout->orientation());
|
||||
m_layout->addItem(taskssvg);
|
||||
|
|
Loading…
Add table
Reference in a new issue