panel->g_taskbar.area.size_mode = SIZE_BY_LAYOUT;
panel->g_taskbar.area._resize = resize_taskbar;
panel->g_taskbar.area._draw_foreground = draw_taskbar;
+ panel->g_taskbar.area._on_change_layout = on_change_taskbar;
panel->g_taskbar.area.redraw = 1;
panel->g_taskbar.area.on_screen = 1;
if (panel_horizontal) {
}
+void on_change_taskbar (void *obj)
+{
+ Taskbar *tskbar = obj;
+ int k;
+
+ // reset Pixmap when position/size changed
+ for (k=0; k<TASKBAR_STATE_COUNT; ++k) {
+ if (tskbar->state_pix[k]) XFreePixmap(server.dsp, tskbar->state_pix[k]);
+ tskbar->state_pix[k] = 0;
+ }
+ tskbar->area.pix = 0;
+ tskbar->area.redraw = 1;
+}
+
+
void set_taskbar_state(Taskbar *tskbar, int state)
{
tskbar->area.bg = panel1[0].g_taskbar.background[state];
void task_refresh_tasklist ();
int resize_taskbar(void *obj);
+void on_change_taskbar (void *obj);
void set_taskbar_state(Taskbar *tskbar, int state);
// show/hide taskbar according to current desktop