/**************************************************************************
*
* Copyright (C) 2008 Pål Staurland (staura@gmail.com)
-* Modified (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr)
+* Modified (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr) from Omega distribution
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
p->area.on_screen = 1;
p->area.resize = 1;
p->area.size_mode = SIZE_BY_LAYOUT;
- p->area._resize = resize_by_layout;
+ p->area._resize = resize_panel;
p->g_taskbar.area.parent = p;
p->g_taskbar.area.panel = p;
p->g_task.area.panel = p;
}
+int resize_panel(void *obj)
+{
+ resize_by_layout(obj, 0);
+
+ //printf("resize_panel\n");
+ if (panel_mode != MULTI_DESKTOP && taskbar_enabled) {
+ // propagate width/height on hidden taskbar
+ int i, width, height;
+ Panel *panel = (Panel*)obj;
+ width = panel->taskbar[server.desktop].area.width;
+ height = panel->taskbar[server.desktop].area.height;
+ for (i=0 ; i < panel->nb_desktop ; i++) {
+ panel->taskbar[i].area.width = width;
+ panel->taskbar[i].area.height = height;
+ panel->taskbar[i].area.resize = 1;
+ }
+ }
+ return 0;
+}
+
+
void update_strut(Panel* p)
{
if (panel_strut_policy == STRUT_NONE) {
}
// redraw panel's object
- //p->area.redraw = 1;
GSList *l0;
Area *a;
for (l0 = p->area.list; l0 ; l0 = l0->next) {
set_redraw(a);
}
- // reset task 'state_pix'
- int i;
+ // reset task/taskbar 'state_pix'
+ int i, k;
Taskbar *tskbar;
for (i=0 ; i < p->nb_desktop ; i++) {
tskbar = &p->taskbar[i];
+ 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;
for (l0 = tskbar->area.list; l0 ; l0 = l0->next) {
set_task_redraw((Task *)l0->data);
}