Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_paned.c 


Log Message:
don't loop infinitely if there is now visible pane

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_paned.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- ewl_paned.c 5 Nov 2007 21:07:46 -0000       1.58
+++ ewl_paned.c 6 Nov 2007 16:38:01 -0000       1.59
@@ -437,11 +437,14 @@
                main_pos = CURRENT_Y(w);
        }
 
-       if (ecore_dlist_empty_is(c->children))
-               DRETURN(DLEVEL_STABLE);
-       
        /* we need to now the number of panes */        
        pane_num = (ewl_container_child_count_visible_get(c) + 1)/2;
+
+       /* we cannot place the panes if there aren't any */
+       if (pane_num <= 0)
+               DRETURN(DLEVEL_STABLE);
+
+       /* setup the array holding the information about the panes */
        panes = alloca(sizeof(Ewl_Paned_Pane_Info) * pane_num);
 
        grabber_size = ewl_paned_grapper_size_get(p);
@@ -658,7 +661,7 @@
 
                /* if we have no panes we don't need to calc their place */
                if (cur_res < 1)
-                       break;
+                       DRETURN(DLEVEL_STABLE);
 
                /* give can also be negative, so see it as a can take or give */
                give = available / cur_res;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to