New config option: taskbar sort by LRU/MRU (no config GUI yet) (issue #532)

This commit is contained in:
o9000
2015-12-05 11:07:23 +01:00
parent 3f84d5d14c
commit ea82926b3f
6 changed files with 26 additions and 0 deletions

View File

@@ -522,6 +522,10 @@ gint compare_tasks(Task *a, Task *b, Taskbar *taskbar)
return compare_task_centers(a, b, taskbar);
} else if (taskbar_sort_method == TASKBAR_SORT_TITLE) {
return compare_task_titles(a, b, taskbar);
} else if (taskbar_sort_method == TASKBAR_SORT_LRU) {
return compare_timespecs(&a->last_activation_time, &b->last_activation_time);
} else if (taskbar_sort_method == TASKBAR_SORT_MRU) {
return -compare_timespecs(&a->last_activation_time, &b->last_activation_time);
}
return 0;
}