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
o9000 o9000
1 files changed,
9 insertions(+),
2 deletions(-)
jump to
M
src/taskbar/taskbar.c
→
src/taskbar/taskbar.c
@@ -426,10 +426,17 @@ a_horiz_c = a->win_x + a->win_w / 2;
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)