From 7ea0dc241c7cd86ef28c2ea7edbb8eb81c162e5a Mon Sep 17 00:00:00 2001 From: o9000 Date: Sat, 30 May 2015 13:33:44 +0200 Subject: [PATCH] systray: Sort icons in the correct order when an icon is empty and order is right2left --- src/systray/systraybar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index e9fb61d..4780183 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -342,9 +342,9 @@ static gint compare_traywindows(gconstpointer a, gconstpointer b) const TrayWindow * traywin_b = (TrayWindow*)b; if (traywin_a->empty && !traywin_b->empty) - return 1; + return 1 * (systray.sort == SYSTRAY_SORT_RIGHT2LEFT ? -1 : 1); if (!traywin_a->empty && traywin_b->empty) - return -1; + return -1 * (systray.sort == SYSTRAY_SORT_RIGHT2LEFT ? -1 : 1); if (systray.sort == SYSTRAY_SORT_ASCENDING || systray.sort == SYSTRAY_SORT_DESCENDING) {