Changing window flags that affect the look does now also work more or less fine.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15268 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-12-01 15:02:11 +00:00
parent 05aea1dd4a
commit 6b86db1c42
2 changed files with 27 additions and 1 deletions

View File

@ -136,6 +136,23 @@ DefaultDecorator::SetLook(DesktopSettings& settings,
void
DefaultDecorator::SetFlags(uint32 flags, BRegion* updateRegion)
{
// TODO: we could be much smarter about the update region
// get previous extent
if (updateRegion != NULL) {
BRegion extent;
GetFootprint(&extent);
updateRegion->Include(&extent);
}
Decorator::SetFlags(flags, updateRegion);
_DoLayout();
if (updateRegion != NULL) {
BRegion extent;
GetFootprint(&extent);
updateRegion->Include(&extent);
}
}

View File

@ -725,7 +725,16 @@ WindowLayer::SetFeel(window_feel feel)
void
WindowLayer::SetWindowFlags(uint32 flags, BRegion* updateRegion)
{
// TODO: implement settings window flags
fWindowFlags = flags;
if (fDecorator == NULL)
return;
fDecorator->SetFlags(flags, updateRegion);
fRebuildDecRegion = true;
// TODO: we might need to resize the window!
//fDecorator->GetSizeLimits(&fMinWidth, &fMinHeight, &fMaxWidth, &fMaxHeight);
}