- Systraybar *sysbar = obj;
- Panel *panel = sysbar->area.panel;
- TrayWindow *traywin;
- GSList *l;
- int icon_size;
-
- //printf("draw_systray %d %d\n", systray.area.posx, systray.area.width);
- icon_size = sysbar->area.height - (2 * sysbar->area.pix.border.width) - (2 * sysbar->area.paddingy);
- for (l = systray.list_icons; l ; l = l->next) {
- traywin = (TrayWindow*)l->data;
-
- // watch for the icon trying to resize itself!
- XSelectInput(server.dsp, traywin->id, StructureNotifyMask|ResizeRedirectMask);
-
- // position and size the icon window
- XMoveResizeWindow(server.dsp, traywin->id, traywin->x, traywin->y, icon_size, icon_size);
- // ceci intervertie les fonds : le premier icone prend le fond du dernier
- // le dernier prend le fond de l'avant dernier, ...
- XSetWindowBackgroundPixmap (server.dsp, panel->main_win, systray.area.pix.pmap);
-
- // resize our window so that the new window can fit in it
- //fix_geometry();
-
- // flush before clearing, otherwise the clear isn't effective.
- XFlush(server.dsp);
- // make sure the new child will get the right stuff in its background
- // for ParentRelative.
- XClearWindow(server.dsp, panel->main_win);
-
- // show the window
- XMapRaised(server.dsp, traywin->id);
- }