- XCopyArea (server.dsp, p->area.pix.pmap, p->root_pmap, server.gc, 0, 0, p->area.width, p->area.height, 0, 0);
+ // change posx and width for all taskbar
+ int i, posx;
+ posx = panel->area.pix.border.width + panel->area.paddingxlr;
+ for (i=0 ; i < panel->nb_desktop ; i++) {
+ panel->taskbar[i].area.posx = posx;
+ panel->taskbar[i].area.width = taskbar_width;
+ panel->taskbar[i].area.resize = 1;
+ if (modulo_width) {
+ panel->taskbar[i].area.width++;
+ modulo_width--;
+ }
+ //printf("taskbar %d : posx %d, width, %d, posy %d\n", i, posx, panel->taskbar[i].area.width, posx + panel->taskbar[i].area.width);
+ if (panel_mode == MULTI_DESKTOP)
+ posx += panel->taskbar[i].area.width + panel->area.paddingx;
+ }
+ }
+ else {
+ int taskbar_height, modulo_height = 0;
+ int i, posy;
+
+ taskbar_height = panel->area.height - (2 * panel->area.paddingxlr) - (2 * panel->area.pix.border.width);
+ if (panel->clock.area.on_screen && panel->clock.area.height)
+ taskbar_height -= (panel->clock.area.height + panel->area.paddingx);
+ #ifdef ENABLE_BATTERY
+ if (panel->battery.area.on_screen && panel->battery.area.height)
+ taskbar_height -= (panel->battery.area.height + panel->area.paddingx);
+ #endif
+ // TODO : systray only on first panel. search better implementation !
+ if (systray.area.on_screen && systray.area.height && panel == &panel1[0])
+ taskbar_height -= (systray.area.height + panel->area.paddingx);
+
+ posy = panel->area.height - panel->area.pix.border.width - panel->area.paddingxlr - taskbar_height;
+ if (panel_mode == MULTI_DESKTOP) {
+ int height = taskbar_height - ((panel->nb_desktop-1) * panel->area.paddingx);
+ taskbar_height = height / panel->nb_desktop;
+ modulo_height = height % panel->nb_desktop;
+ }