all repos — tint2 @ 4d2def5633a0b3c6c0d20094bd6663e1707ace89

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

revert some code from r561 (generic resize function)

git-svn-id: http://tint2.googlecode.com/svn/trunk@564 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
thilor77 thilor77@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

4d2def5633a0b3c6c0d20094bd6663e1707ace89

parent

c19819843ef106e2847f137d9a89407cf667c672

2 files changed, 22 insertions(+), 1 deletions(-)

jump to
M src/panel.csrc/panel.c

@@ -168,7 +168,7 @@ p->area.panel = p;

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;

@@ -299,6 +299,26 @@ panel->hidden_width = panel->area.width - diff;

panel->hidden_height = panel->area.height; } // printf("panel : posx %d, posy %d, width %d, height %d\n", panel->posx, panel->posy, panel->area.width, panel->area.height); +} + + +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; }
M src/panel.hsrc/panel.h

@@ -135,6 +135,7 @@ // use panel_config as default value

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);