Sort tasks on taskbar: use panel orientation (disabled, work in progress) - issue 478

git-svn-id: http://tint2.googlecode.com/svn/trunk@741 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
o9000 2015-03-28 21:10:23 +00:00 committed by mrovi9000@gmail.com
parent 5376e09963
commit 82fe74743c

View file

@ -426,10 +426,17 @@ gint compare_tasks(Task *a, Task *b, Taskbar *taskbar)
b_horiz_c = b->win_x + b->win_w / 2;
a_vert_c = a->win_y + a->win_h / 2;
b_vert_c = b->win_y + b->win_h / 2;
if (a_horiz_c != b_horiz_c) {
if (panel_horizontal) {
if (a_horiz_c != b_horiz_c) {
return a_horiz_c - b_horiz_c;
}
return a_vert_c - b_vert_c;
} else {
if (a_vert_c != b_vert_c) {
return a_vert_c - b_vert_c;
}
return a_horiz_c - b_horiz_c;
}
return a_vert_c - b_vert_c;
}
int taskbar_needs_sort(Taskbar *taskbar)