X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftint2;a=blobdiff_plain;f=src%2Fsystray%2Fsystraybar.c;h=c2f437e679d067d3eed61e0684dd720e9da4c30e;hp=abf633ecb6b4231ab730a6bd185a7dda87f6fe67;hb=c929b4afa0049f43fd31927680303d3516f6e84f;hpb=90eae1e7be4621a84a0253c3048790523f0c8375 diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index abf633e..c2f437e 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -167,11 +167,10 @@ 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 = systray.area.posy + 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 +188,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) {