revert some code from r561 (generic resize function)

git-svn-id: http://tint2.googlecode.com/svn/trunk@564 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
thilor77 2010-09-24 19:16:55 +00:00
parent c19819843e
commit 4d2def5633
2 changed files with 22 additions and 1 deletions

View file

@ -168,7 +168,7 @@ void init_panel()
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;
@ -302,6 +302,26 @@ void init_panel_size_and_position(Panel *panel)
}
int resize_panel(void *obj)
{
int ret = resize_by_layout(obj);
if (panel_mode != MULTI_DESKTOP) {
// 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 ret;
}
void update_strut(Panel* p)
{
if (panel_strut_policy == STRUT_NONE) {

View file

@ -135,6 +135,7 @@ void cleanup_panel();
void init_panel();
void init_panel_size_and_position(Panel *panel);
int resize_panel(void *obj);
void set_panel_items_order(Panel *p);
void set_panel_properties(Panel *p);