Fix changing of the window feel and borderless windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42491 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+16
-12
@@ -1213,16 +1213,6 @@ Window::FontsChanged(BRegion* updateRegion)
|
|||||||
void
|
void
|
||||||
Window::SetLook(window_look look, BRegion* updateRegion)
|
Window::SetLook(window_look look, BRegion* updateRegion)
|
||||||
{
|
{
|
||||||
::Decorator* decorator = Decorator();
|
|
||||||
if (decorator == NULL && look != B_NO_BORDER_WINDOW_LOOK) {
|
|
||||||
// we need a new decorator
|
|
||||||
decorator = gDecorManager.AllocateDecorator(this);
|
|
||||||
if (IsFocus()) {
|
|
||||||
int32 index = PositionInStack();
|
|
||||||
decorator->SetFocus(index, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fLook = look;
|
fLook = look;
|
||||||
|
|
||||||
fContentRegionValid = false;
|
fContentRegionValid = false;
|
||||||
@@ -1231,6 +1221,20 @@ Window::SetLook(window_look look, BRegion* updateRegion)
|
|||||||
// ...and therefor the drawing region is
|
// ...and therefor the drawing region is
|
||||||
// likely not valid anymore either
|
// likely not valid anymore either
|
||||||
|
|
||||||
|
if (fCurrentStack.Get() == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
::Decorator* decorator = Decorator();
|
||||||
|
if (decorator == NULL && look != B_NO_BORDER_WINDOW_LOOK) {
|
||||||
|
// we need a new decorator
|
||||||
|
decorator = gDecorManager.AllocateDecorator(this);
|
||||||
|
fCurrentStack->SetDecorator(decorator);
|
||||||
|
if (IsFocus()) {
|
||||||
|
int32 index = PositionInStack();
|
||||||
|
decorator->SetFocus(index, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (decorator != NULL) {
|
if (decorator != NULL) {
|
||||||
DesktopSettings settings(fDesktop);
|
DesktopSettings settings(fDesktop);
|
||||||
decorator->SetLook(settings, look, updateRegion);
|
decorator->SetLook(settings, look, updateRegion);
|
||||||
@@ -1241,7 +1245,7 @@ Window::SetLook(window_look look, BRegion* updateRegion)
|
|||||||
_ObeySizeLimits();
|
_ObeySizeLimits();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (look == B_NO_BORDER_WINDOW_LOOK && fCurrentStack.Get() != NULL) {
|
if (look == B_NO_BORDER_WINDOW_LOOK) {
|
||||||
// we don't need a decorator for this window
|
// we don't need a decorator for this window
|
||||||
fCurrentStack->SetDecorator(NULL);
|
fCurrentStack->SetDecorator(NULL);
|
||||||
}
|
}
|
||||||
@@ -2152,7 +2156,7 @@ Window::StackedWindowAt(const BPoint& where)
|
|||||||
{
|
{
|
||||||
::Decorator* decorator = Decorator();
|
::Decorator* decorator = Decorator();
|
||||||
if (decorator == NULL)
|
if (decorator == NULL)
|
||||||
return NULL;
|
return this;
|
||||||
|
|
||||||
int tab = decorator->TabAt(where);
|
int tab = decorator->TabAt(where);
|
||||||
// if we have a decorator we also have a stack
|
// if we have a decorator we also have a stack
|
||||||
|
|||||||
Reference in New Issue
Block a user