From 6b86db1c421ac6d68498b6a3738b86f6530b9505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 1 Dec 2005 15:02:11 +0000 Subject: [PATCH] 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 --- src/servers/app/DefaultDecorator.cpp | 17 +++++++++++++++++ src/servers/app/WindowLayer.cpp | 11 ++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/servers/app/DefaultDecorator.cpp b/src/servers/app/DefaultDecorator.cpp index 9c0d066bbe..341b66fd4c 100644 --- a/src/servers/app/DefaultDecorator.cpp +++ b/src/servers/app/DefaultDecorator.cpp @@ -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); + } } diff --git a/src/servers/app/WindowLayer.cpp b/src/servers/app/WindowLayer.cpp index 34e3b28811..cd0ca255c5 100644 --- a/src/servers/app/WindowLayer.cpp +++ b/src/servers/app/WindowLayer.cpp @@ -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); }