Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_events.c ewl_window.c 


Log Message:

finally tracked down the sizing bug that caused windows to cut off their 
children.
something similar may need to be done to ewl_embed.


===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_events.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_events.c        9 Jan 2006 00:04:26 -0000       1.18
+++ ewl_events.c        1 Feb 2006 07:14:12 -0000       1.19
@@ -236,8 +236,15 @@
        /*
         * Configure events really only need to occur on resize.
         */
-       if ((CURRENT_W(window) != ev->w) || (CURRENT_H(window) != ev->h)) {
-               window->flags |= EWL_WINDOW_USER_CONFIGURE;
+       if ((ewl_object_current_w_get(EWL_OBJECT(window)) != ev->w) || 
(ewl_object_current_h_get(EWL_OBJECT(window)) != ev->h)) {
+
+    /* 
+     * Right now this is commented out, as it was preventing windows from 
resizing
+     * when WE were the ones setting the size (mainly on initial show of the
+     * window). It would be nice to add this back in to limit the # of window
+     * resizes occuring. (As long as it doesn't break initial size.)
+     */
+               /* if (ev->from_wm) window->flags |= EWL_WINDOW_USER_CONFIGURE; 
*/
                ewl_object_geometry_request(EWL_OBJECT(window), 0, 0, ev->w,
                                            ev->h);
        }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_window.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ewl_window.c        1 Feb 2006 05:43:48 -0000       1.29
+++ ewl_window.c        1 Feb 2006 07:14:12 -0000       1.30
@@ -1033,7 +1033,7 @@
         * Now give the windows the appropriate size and adjust the evas as
         * well.
         */
-       if (win->flags & EWL_WINDOW_USER_CONFIGURE)
+  if (win->flags & EWL_WINDOW_USER_CONFIGURE)
                win->flags &= ~EWL_WINDOW_USER_CONFIGURE;
        else {
 #ifdef ENABLE_EWL_SOFTWARE_X11
@@ -1083,6 +1083,7 @@
        ecore_list_goto_first(EWL_CONTAINER(w)->children);
        while ((child = ecore_list_next(EWL_CONTAINER(w)->children))) {
                int x, y;
+    int size;
 
                /*
                 * Try to give the child the full size of the window from it's
@@ -1092,12 +1093,22 @@
                 */
                x = ewl_object_current_x_get(EWL_OBJECT(child));
                y = ewl_object_current_y_get(EWL_OBJECT(child));
-    
+   
                if (x < CURRENT_X(w))
+    {
                        x = CURRENT_X(w);
+      size = ewl_object_preferred_w_get(EWL_OBJECT(child));
+      if (size > PREFERRED_W(w))
+        ewl_object_preferred_inner_w_set(EWL_OBJECT(w), size);
+    }
                if (y < CURRENT_Y(w))
+    {
                        y = CURRENT_Y(w);
-    
+      size = ewl_object_preferred_h_get(EWL_OBJECT(child));
+      if (size > PREFERRED_H(w))
+        ewl_object_preferred_inner_h_set(EWL_OBJECT(w), size);
+    }
+
                ewl_object_place(child, x, y, CURRENT_W(w) - (x - CURRENT_X(w)),
                                 CURRENT_H(w) - (y - CURRENT_Y(w)));
        }




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to