Invalidate the footprint at the right time to fix the calculation of the dirty border region.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37610 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
604ae84e46
commit
962281e833
@ -99,9 +99,9 @@ Decorator::SetFlags(uint32 flags, BRegion* updateRegion)
|
|||||||
if (flags & B_NOT_RESIZABLE)
|
if (flags & B_NOT_RESIZABLE)
|
||||||
flags |= B_NOT_H_RESIZABLE | B_NOT_V_RESIZABLE;
|
flags |= B_NOT_H_RESIZABLE | B_NOT_V_RESIZABLE;
|
||||||
|
|
||||||
fFootprintValid = false;
|
|
||||||
// the border might have changed (smaller/larger tab)
|
|
||||||
_SetFlags(flags, updateRegion);
|
_SetFlags(flags, updateRegion);
|
||||||
|
_InvalidateFootprint();
|
||||||
|
// the border might have changed (smaller/larger tab)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -110,8 +110,8 @@ Decorator::SetFlags(uint32 flags, BRegion* updateRegion)
|
|||||||
void
|
void
|
||||||
Decorator::FontsChanged(DesktopSettings& settings, BRegion* updateRegion)
|
Decorator::FontsChanged(DesktopSettings& settings, BRegion* updateRegion)
|
||||||
{
|
{
|
||||||
fFootprintValid = false;
|
|
||||||
_FontsChanged(settings, updateRegion);
|
_FontsChanged(settings, updateRegion);
|
||||||
|
_InvalidateFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -122,9 +122,9 @@ void
|
|||||||
Decorator::SetLook(DesktopSettings& settings, window_look look,
|
Decorator::SetLook(DesktopSettings& settings, window_look look,
|
||||||
BRegion* updateRect)
|
BRegion* updateRect)
|
||||||
{
|
{
|
||||||
fFootprintValid = false;
|
|
||||||
// the border very likely changed
|
|
||||||
_SetLook(settings, look, updateRect);
|
_SetLook(settings, look, updateRect);
|
||||||
|
_InvalidateFootprint();
|
||||||
|
// the border very likely changed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -183,12 +183,12 @@ Decorator::SetZoom(bool pressed)
|
|||||||
void
|
void
|
||||||
Decorator::SetTitle(const char* string, BRegion* updateRegion)
|
Decorator::SetTitle(const char* string, BRegion* updateRegion)
|
||||||
{
|
{
|
||||||
fFootprintValid = false;
|
|
||||||
// the border very likely changed
|
|
||||||
|
|
||||||
fTitle.SetTo(string);
|
fTitle.SetTo(string);
|
||||||
_SetTitle(string, updateRegion);
|
_SetTitle(string, updateRegion);
|
||||||
|
|
||||||
|
_InvalidateFootprint();
|
||||||
|
// the border very likely changed
|
||||||
|
|
||||||
// TODO: redraw?
|
// TODO: redraw?
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,8 +406,8 @@ Decorator::ResizeBy(float x, float y, BRegion* dirty)
|
|||||||
void
|
void
|
||||||
Decorator::ResizeBy(BPoint offset, BRegion* dirty)
|
Decorator::ResizeBy(BPoint offset, BRegion* dirty)
|
||||||
{
|
{
|
||||||
fFootprintValid = false;
|
|
||||||
_ResizeBy(offset, dirty);
|
_ResizeBy(offset, dirty);
|
||||||
|
_InvalidateFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ bool
|
|||||||
Decorator::SetTabLocation(float location, BRegion* updateRegion)
|
Decorator::SetTabLocation(float location, BRegion* updateRegion)
|
||||||
{
|
{
|
||||||
if (_SetTabLocation(location, updateRegion)) {
|
if (_SetTabLocation(location, updateRegion)) {
|
||||||
fFootprintValid = false;
|
_InvalidateFootprint();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -426,7 +426,7 @@ bool
|
|||||||
Decorator::SetSettings(const BMessage& settings, BRegion* updateRegion)
|
Decorator::SetSettings(const BMessage& settings, BRegion* updateRegion)
|
||||||
{
|
{
|
||||||
if (_SetSettings(settings, updateRegion)) {
|
if (_SetSettings(settings, updateRegion)) {
|
||||||
fFootprintValid = false;
|
_InvalidateFootprint();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -667,3 +667,10 @@ void
|
|||||||
Decorator::_GetFootprint(BRegion *region)
|
Decorator::_GetFootprint(BRegion *region)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Decorator::_InvalidateFootprint()
|
||||||
|
{
|
||||||
|
fFootprintValid = false;
|
||||||
|
}
|
||||||
|
@ -158,6 +158,7 @@ protected:
|
|||||||
BRegion* updateRegion = NULL);
|
BRegion* updateRegion = NULL);
|
||||||
|
|
||||||
virtual void _GetFootprint(BRegion *region);
|
virtual void _GetFootprint(BRegion *region);
|
||||||
|
void _InvalidateFootprint();
|
||||||
|
|
||||||
DrawingEngine* fDrawingEngine;
|
DrawingEngine* fDrawingEngine;
|
||||||
DrawState fDrawState;
|
DrawState fDrawState;
|
||||||
|
@ -775,6 +775,7 @@ DefaultDecorator::_FontsChanged(DesktopSettings& settings,
|
|||||||
_InvalidateBitmaps();
|
_InvalidateBitmaps();
|
||||||
_DoLayout();
|
_DoLayout();
|
||||||
|
|
||||||
|
_InvalidateFootprint();
|
||||||
if (updateRegion != NULL)
|
if (updateRegion != NULL)
|
||||||
updateRegion->Include(&GetFootprint());
|
updateRegion->Include(&GetFootprint());
|
||||||
}
|
}
|
||||||
@ -796,6 +797,7 @@ DefaultDecorator::_SetLook(DesktopSettings& settings, window_look look,
|
|||||||
_InvalidateBitmaps();
|
_InvalidateBitmaps();
|
||||||
_DoLayout();
|
_DoLayout();
|
||||||
|
|
||||||
|
_InvalidateFootprint();
|
||||||
if (updateRegion != NULL)
|
if (updateRegion != NULL)
|
||||||
updateRegion->Include(&GetFootprint());
|
updateRegion->Include(&GetFootprint());
|
||||||
}
|
}
|
||||||
@ -813,6 +815,7 @@ DefaultDecorator::_SetFlags(uint32 flags, BRegion* updateRegion)
|
|||||||
fFlags = flags;
|
fFlags = flags;
|
||||||
_DoLayout();
|
_DoLayout();
|
||||||
|
|
||||||
|
_InvalidateFootprint();
|
||||||
if (updateRegion != NULL)
|
if (updateRegion != NULL)
|
||||||
updateRegion->Include(&GetFootprint());
|
updateRegion->Include(&GetFootprint());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user