X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpanel.c;h=f5eaf9a16277bf299ba98dab0e05e2120544defc;hb=2fe8ce00afa75977d3fd394481b19deaf3d102a5;hp=6a98a26191aaf43ad2efc13daa1b5f3d4b8c019a;hpb=63bbffa4af17926ba2d52728883988eae402b07a;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index 6a98a26..f5eaf9a 100644 --- a/src/panel.c +++ b/src/panel.c @@ -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,27 @@ void init_panel_size_and_position(Panel *panel) } +int resize_panel(void *obj) +{ + resize_by_layout(obj, 0); + + //printf("resize_panel\n"); + 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 0; +} + + void update_strut(Panel* p) { if (panel_strut_policy == STRUT_NONE) { @@ -502,7 +523,6 @@ void set_panel_background(Panel *p) } // redraw panel's object - //p->area.redraw = 1; GSList *l0; Area *a; for (l0 = p->area.list; l0 ; l0 = l0->next) {