Commit 02bc67af authored by Yari Polla's avatar Yari Polla Committed by Devin Lin
Browse files

taskswitcher: add delay for tasks reordering

parent 8f128913
Pipeline #169524 passed with stage
in 1 minute and 11 seconds
......@@ -46,6 +46,7 @@ Item {
}
function activateApp() {
taskSwitcherState.wasInActiveTask = false;
taskSwitcher.activateWindow(model.index);
}
//END functions
......
......@@ -73,6 +73,14 @@ Item {
oldTasksCount = tasksCount;
}
Timer {
id: reorderTimer
interval: 5000
onTriggered: tasksModel.taskReorderingEnabled = true
}
//BEGIN functions
function show(animation) {
......@@ -83,6 +91,9 @@ Item {
taskSwitcherState.wasInActiveTask = tasksModel.activeTask.row >= 0;
taskSwitcherState.currentlyBeingOpened = true;
reorderTimer.stop();
tasksModel.taskReorderingEnabled = false;
// skip to first active task
if (taskSwitcherState.wasInActiveTask) {
taskSwitcherState.goToTaskIndex(tasksModel.activeTask.row);
......@@ -140,6 +151,12 @@ Item {
}
instantHide();
if (taskSwitcherState.wasInActiveTask) {
reorderTimer.restart();
} else {
tasksModel.taskReorderingEnabled = true;
}
}
function minimizeAll() {
......@@ -156,6 +173,7 @@ Item {
easing.type: Easing.InOutQuad
onFinished: {
root.visible = false;
tasksModel.taskReorderingEnabled = true;
}
}
......
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