Author: miguel
Date: 2007-06-10 14:01:35 -0400 (Sun, 10 Jun 2007)
New Revision: 79123

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/demo.cpp
   trunk/moon/src/runtime.cpp
   trunk/moon/src/runtime.h
Log:
2007-06-10  Miguel de Icaza  <[EMAIL PROTECTED]>

        * runtime.h (Base): make destructor virtual so that base_unref can
        call delete (Base *) p.   Exposed by the managed code when the
        first base_unref ran for the first time :-)

        I sense a leak!

        * runtime.cpp (surface_attach): invalidate the areas before and
        after, compute the bounds using item_update_bounds, not the
        getbounds method directly.




Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-06-10 17:56:10 UTC (rev 79122)
+++ trunk/moon/src/ChangeLog    2007-06-10 18:01:35 UTC (rev 79123)
@@ -1,3 +1,15 @@
+2007-06-10  Miguel de Icaza  <[EMAIL PROTECTED]>
+
+       * runtime.h (Base): make destructor virtual so that base_unref can
+       call delete (Base *) p.   Exposed by the managed code when the
+       first base_unref ran for the first time :-)
+
+       I sense a leak!
+
+       * runtime.cpp (surface_attach): invalidate the areas before and
+       after, compute the bounds using item_update_bounds, not the
+       getbounds method directly.
+
 2007-06-10  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * xaml.cpp: Add PathFigure[Collection]/Segments support.

Modified: trunk/moon/src/demo.cpp
===================================================================
--- trunk/moon/src/demo.cpp     2007-06-10 17:56:10 UTC (rev 79122)
+++ trunk/moon/src/demo.cpp     2007-06-10 18:01:35 UTC (rev 79123)
@@ -117,7 +117,6 @@
                }
 
                surface_attach (t, e);
-               
        } else {
                Canvas *canvas = new Canvas ();
                surface_attach (t, canvas);

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2007-06-10 17:56:10 UTC (rev 79122)
+++ trunk/moon/src/runtime.cpp  2007-06-10 18:01:35 UTC (rev 79123)
@@ -655,7 +655,7 @@
 
        item->parent = panel;
        item->update_xform ();
-       panel->getbounds ();
+       item_update_bounds (panel);
        item_invalidate (panel);
 }
 
@@ -671,7 +671,7 @@
        item_invalidate (item);
        base_unref (item);
 
-       panel->getbounds ();
+       item_update_bounds (panel);
 }
 
 void 
@@ -1016,13 +1016,19 @@
                printf ("Unsupported toplevel\n");
                return;
        }
-       if (surface->toplevel)
+       if (surface->toplevel){
+               item_invalidate (surface->toplevel);
                base_unref (surface->toplevel);
+       }
 
        Canvas *canvas = (Canvas *) toplevel;
        base_ref (canvas);
+
        canvas->surface = surface;
        surface->toplevel = canvas;
+
+       item_update_bounds (canvas);
+       item_invalidate (canvas);
 }
 
 void

Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h    2007-06-10 17:56:10 UTC (rev 79122)
+++ trunk/moon/src/runtime.h    2007-06-10 18:01:35 UTC (rev 79123)
@@ -198,6 +198,7 @@
  public:       
        uint32_t refcount;
        Base () : refcount(BASE_FLOATS) {}
+       virtual ~Base () {} 
 };
 
 void base_ref   (Base *base);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to