all repos — tint2 @ b70e6b500e747c4b18f3b1948fe193ce22255289

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

Better handling of the systray_monitor option

git-svn-id: http://tint2.googlecode.com/svn/trunk@678 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
o9000 o9000
commit

b70e6b500e747c4b18f3b1948fe193ce22255289

parent

5a789c2d7f1715646778e1f5cd77ae004f7e6cc7

3 files changed, 9 insertions(+), 5 deletions(-)

jump to
M src/panel.csrc/panel.c

@@ -184,8 +184,7 @@ #ifdef ENABLE_BATTERY

if (panel_items_order[k] == 'B') init_battery_panel(p); #endif - if (panel_items_order[k] == 'S' && - ((i == systray_monitor) || (i == 0 && systray_monitor >= nb_panel))) { + if (panel_items_order[k] == 'S' && systray_on_monitor(i, nb_panel)) { init_systray_panel(p); refresh_systray = 1; }

@@ -487,8 +486,7 @@ if (panel_items_order[k] == 'B')

p->area.list = g_slist_append(p->area.list, &p->battery); #endif int i = p - panel1; - if (panel_items_order[k] == 'S' && - ((i == systray_monitor) || (i == 0 && systray_monitor >= nb_panel))) { + if (panel_items_order[k] == 'S' && systray_on_monitor(i, nb_panel)) { p->area.list = g_slist_append(p->area.list, &systray); } if (panel_items_order[k] == 'C')
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -636,3 +636,9 @@ if (traywin->hide) continue;

systray_render_icon(traywin); } } + +int systray_on_monitor(int i_monitor, int nb_panels) +{ + return (i_monitor == systray_monitor) || + (i_monitor == 0 && (systray_monitor >= nb_panels || systray_monitor < 0)); +}
M src/systray/systraybar.hsrc/systray/systraybar.h

@@ -67,7 +67,7 @@

void draw_systray(void *obj, cairo_t *c); int resize_systray(void *obj); void on_change_systray(void *obj); - +int systray_on_monitor(int i_monitor, int nb_panels); // systray protocol // many tray icon doesn't manage stop/restart of the systray manager