X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fsystray%2Fsystraybar.c;h=c0672e35b7335d1fde481e71f8f2326729215580;hb=87acd48b92031b378887ea8b7ea9fa54aea8fa25;hp=abf633ecb6b4231ab730a6bd185a7dda87f6fe67;hpb=1c1cfea95e549170ede1eaf05240b935aa2186a9;p=chaz%2Ftint2 diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index abf633e..c0672e3 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -98,7 +98,9 @@ void init_systray_panel(void *p) { systray.area.parent = p; systray.area.panel = p; - + if (systray.area.bg == 0) + systray.area.bg = &g_array_index(backgrounds, Background, 0); + GSList *l; int count = 0; for (l = systray.list_icons; l ; l = l->next) { @@ -167,11 +169,11 @@ int resize_systray(void *obj) void on_change_systray (void *obj) { - // here, sysbar's position is defined. so we can calculate position of tray icon. + // here, systray.area.posx/posy are defined by rendering engine. so we can calculate position of tray icon. Systraybar *sysbar = obj; Panel *panel = sysbar->area.panel; int i, posx, posy; - int start = panel->area.bg->border.width + panel->area.paddingy + systray.area.bg->border.width + systray.area.paddingy +sysbar->marging/2; + int start = panel->area.bg->border.width + panel->area.paddingy + systray.area.bg->border.width + systray.area.paddingy + sysbar->marging/2; if (panel_horizontal) { posy = start; posx = systray.area.posx + systray.area.bg->border.width + systray.area.paddingxlr; @@ -189,6 +191,7 @@ void on_change_systray (void *obj) traywin->y = posy; traywin->x = posx; + //printf("systray %d : %d,%d\n", i, posx, posy); traywin->width = sysbar->icon_size; traywin->height = sysbar->icon_size; if (panel_horizontal) {