Author: toshok
Date: 2007-10-01 16:09:56 -0400 (Mon, 01 Oct 2007)
New Revision: 86722
Modified:
trunk/moon/src/dirty.cpp
trunk/moon/src/panel.cpp
Log:
2007-10-01 Chris Toshok <[EMAIL PROTECTED]>
* dirty.cpp (process_dirty_elements): remove the special if checks
which kept the ComputeBounds/Invalidate code from running on the
toplevel surface. Canvas::ComputeBounds() does the right thing
for the toplevel surface, so we just trust it. fixes invalidation
of root canvases.
* panel.cpp (OnPropertyChanged): remove the ComputeBounds call.
(OnSubPropertyChanged): same.
Modified: trunk/moon/src/dirty.cpp
===================================================================
--- trunk/moon/src/dirty.cpp 2007-10-01 19:08:52 UTC (rev 86721)
+++ trunk/moon/src/dirty.cpp 2007-10-01 20:09:56 UTC (rev 86722)
@@ -170,28 +170,24 @@
// printf (" + bounds\n");
el->dirty_flags &= ~DirtyBounds;
- if (!el->Is(Type::CANVAS)
- || el->parent
- || !el->GetSurface()
- || el->GetSurface()->GetToplevel() != el) {
+ Rect obounds = el->GetBounds ();
- Rect obounds = el->GetBounds ();
+ el->ComputeBounds ();
- el->ComputeBounds ();
-
// printf (" + + obounds = %f %f %f %f, nbounds =
%f %f %f %f\n",
// obounds.x, obounds.y, obounds.w,
obounds.h,
// el->GetBounds().x, el->GetBounds().y,
el->GetBounds().w, el->GetBounds().h);
- if (obounds != el->GetBounds()) {
- if (el->parent) {
+ if (obounds != el->GetBounds()) {
+ if (el->parent) {
// printf (" + + + calling
UpdateBounds and Invalidate on parent\n");
- el->parent->UpdateBounds();
- el->parent->Invalidate(obounds);
- }
+ el->parent->UpdateBounds();
+ el->parent->Invalidate(obounds);
+ }
- el->Invalidate ();
- }
+ printf ("invalidating bounds, which are now %g %g %g
%g\n",
+ el->GetBounds().x, el->GetBounds().y,
el->GetBounds().w, el->GetBounds().h);
+ el->Invalidate ();
}
}
Modified: trunk/moon/src/panel.cpp
===================================================================
--- trunk/moon/src/panel.cpp 2007-10-01 19:08:52 UTC (rev 86721)
+++ trunk/moon/src/panel.cpp 2007-10-01 20:09:56 UTC (rev 86722)
@@ -510,7 +510,6 @@
background->ref ();
}
- ComputeBounds ();
Invalidate ();
}
}
@@ -519,7 +518,6 @@
Panel::OnSubPropertyChanged (DependencyProperty *prop, DependencyProperty
*subprop)
{
if (prop == Panel::BackgroundProperty) {
- ComputeBounds ();
Invalidate ();
}
else {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches