]> Dogcows Code - chaz/tint2/commitdiff
revert some code from r561 (generic resize function)
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Fri, 24 Sep 2010 19:16:55 +0000 (19:16 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Fri, 24 Sep 2010 19:16:55 +0000 (19:16 +0000)
src/panel.c
src/panel.h

index 6a98a26191aaf43ad2efc13daa1b5f3d4b8c019a..7e21f86371100871d61ac51c7ac57d1fdb5db46a 100644 (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) {
index 833666644ff2b98800b640bb7cb2f30395d5a95b..a2b7f14231c333dbc0df4d224b94344e72fe9199 100644 (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);
This page took 0.027695 seconds and 4 git commands to generate.