]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
launcher : fixed icon position
[chaz/tint2] / src / systray / systraybar.c
index 8a840ce7130a11499a1b058e554c54c1ffbd1200..c2f437e679d067d3eed61e0684dd720e9da4c30e 100644 (file)
@@ -1,7 +1,7 @@
 /**************************************************************************
 * Tint2 : systraybar
 *
-* Copyright (C) 2009 thierry lorthiois (lorthiois@bbsoft.fr)
+* Copyright (C) 2009 thierry lorthiois (lorthiois@bbsoft.fr) from Omega distribution
 * based on 'docker-1.5' from Ben Jansens.
 *
 * This program is free software; you can redistribute it and/or
@@ -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) {
This page took 0.025245 seconds and 4 git commands to generate.