Commit a416f16b authored by Thomas Surrel's avatar Thomas Surrel

[Task Manager] Bring to current desktop with middle-click

This adds a new possible action when middle-click is used on a task
in the task manager: bringing that task to the current desktop.

FEATURE: 360250

Test Plan:
In the task manager settings > Behavior > On middle-click, select
'Bring to the current desktop', and make sure 'Show only tasks from
the current desktop' is deselected.
Having several applications opened on different virtual desktops,
middle-click on a task from another desktop and check that it is
brought to the current one.

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision:
parent 2e2cfa89
......@@ -83,6 +83,7 @@
<choice name="NewInstance"/>
<choice name="ToggleMinimized"/>
<choice name="ToggleGrouping"/>
<choice name="BringToCurrentDesktop"/>
......@@ -112,7 +112,8 @@ Item {
i18n("Close window or group"),
i18n("New instance"),
i18n("Minimize/Restore window or group"),
i18nc("When clicking it would toggle grouping windows of a specific app", "Group/Ungroup")
i18nc("When clicking it would toggle grouping windows of a specific app", "Group/Ungroup"),
i18n("Bring to the current virtual desktop")
......@@ -159,6 +159,8 @@ MouseArea {
} else if (plasmoid.configuration.middleClickAction === TaskManagerApplet.Backend.ToggleGrouping) {
} else if (plasmoid.configuration.middleClickAction === TaskManagerApplet.Backend.BringToCurrentDesktop) {
tasksModel.requestVirtualDesktops(modelIndex(), [virtualDesktopInfo.currentDesktop]);
} else if (mouse.button == Qt.LeftButton) {
TaskTools.activateTask(modelIndex(), model, mouse.modifiers, task);
......@@ -51,7 +51,8 @@ class Backend : public QObject
Markdown is supported
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