all repos — tint2 @ 82fe74743c93e56da29383c528d214604958cf9c

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

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
commit

82fe74743c93e56da29383c528d214604958cf9c

parent

5376e09963769cfa883b12b750d9991fd5bcff21

1 files changed, 9 insertions(+), 2 deletions(-)

jump to
M src/taskbar/taskbar.csrc/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)