Watch the window look and remove a window from a S&T group if the look changed to B_NO_BORDER_WINDOW_LOOK.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38731 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3ae8f84c3d
commit
7306ba0448
@ -281,7 +281,7 @@ StackAndTile::WindowMinimized(Window* window, bool minimize)
|
|||||||
void
|
void
|
||||||
StackAndTile::WindowTabLocationChanged(Window* window, float location)
|
StackAndTile::WindowTabLocationChanged(Window* window, float location)
|
||||||
{
|
{
|
||||||
SATWindow* satWindow = GetSATWindow(window);
|
SATWindow* satWindow = GetSATWindow(window);
|
||||||
if (!satWindow)
|
if (!satWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ void
|
|||||||
StackAndTile::SizeLimitsChanged(Window* window, int32 minWidth, int32 maxWidth,
|
StackAndTile::SizeLimitsChanged(Window* window, int32 minWidth, int32 maxWidth,
|
||||||
int32 minHeight, int32 maxHeight)
|
int32 minHeight, int32 maxHeight)
|
||||||
{
|
{
|
||||||
SATWindow* satWindow = GetSATWindow(window);
|
SATWindow* satWindow = GetSATWindow(window);
|
||||||
if (!satWindow)
|
if (!satWindow)
|
||||||
return;
|
return;
|
||||||
WindowArea* area = satWindow->GetWindowArea();
|
WindowArea* area = satWindow->GetWindowArea();
|
||||||
@ -304,10 +304,27 @@ StackAndTile::SizeLimitsChanged(Window* window, int32 minWidth, int32 maxWidth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
StackAndTile::WindowLookChanged(Window* window, window_look look)
|
||||||
|
{
|
||||||
|
// if the decorator has been removed remove it from the stacking group
|
||||||
|
if (look != B_NO_BORDER_WINDOW_LOOK)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SATWindow* satWindow = GetSATWindow(window);
|
||||||
|
if (!satWindow)
|
||||||
|
return;
|
||||||
|
SATGroup* group = satWindow->GetGroup();
|
||||||
|
if (!group)
|
||||||
|
return;
|
||||||
|
group->RemoveWindow(satWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
StackAndTile::SetDecoratorSettings(Window* window, const BMessage& settings)
|
StackAndTile::SetDecoratorSettings(Window* window, const BMessage& settings)
|
||||||
{
|
{
|
||||||
SATWindow* satWindow = GetSATWindow(window);
|
SATWindow* satWindow = GetSATWindow(window);
|
||||||
if (!satWindow)
|
if (!satWindow)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -319,7 +336,7 @@ StackAndTile::SetDecoratorSettings(Window* window, const BMessage& settings)
|
|||||||
void
|
void
|
||||||
StackAndTile::GetDecoratorSettings(Window* window, BMessage& settings)
|
StackAndTile::GetDecoratorSettings(Window* window, BMessage& settings)
|
||||||
{
|
{
|
||||||
SATWindow* satWindow = GetSATWindow(window);
|
SATWindow* satWindow = GetSATWindow(window);
|
||||||
if (!satWindow)
|
if (!satWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -76,6 +76,8 @@ public:
|
|||||||
virtual void SizeLimitsChanged(Window* window,
|
virtual void SizeLimitsChanged(Window* window,
|
||||||
int32 minWidth, int32 maxWidth,
|
int32 minWidth, int32 maxWidth,
|
||||||
int32 minHeight, int32 maxHeight);
|
int32 minHeight, int32 maxHeight);
|
||||||
|
virtual void WindowLookChanged(Window* window,
|
||||||
|
window_look look);
|
||||||
|
|
||||||
virtual bool SetDecoratorSettings(Window* window,
|
virtual bool SetDecoratorSettings(Window* window,
|
||||||
const BMessage& settings);
|
const BMessage& settings);
|
||||||
|
@ -1491,6 +1491,8 @@ Desktop::SetWindowLook(Window* window, window_look newLook)
|
|||||||
// finds out it needs to resize itself...
|
// finds out it needs to resize itself...
|
||||||
|
|
||||||
RebuildAndRedrawAfterWindowChange(window, dirty);
|
RebuildAndRedrawAfterWindowChange(window, dirty);
|
||||||
|
|
||||||
|
NotifyWindowLookChanged(window, newLook);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -267,6 +267,19 @@ DesktopObservable::NotifySizeLimitsChanged(Window* window, int32 minWidth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
DesktopObservable::NotifyWindowLookChanged(Window* window, window_look look)
|
||||||
|
{
|
||||||
|
if (fWeAreInvoking)
|
||||||
|
return;
|
||||||
|
InvokeGuard invokeGuard(fWeAreInvoking);
|
||||||
|
|
||||||
|
for (DesktopListener* listener = fDesktopListenerList.First();
|
||||||
|
listener != NULL; listener = fDesktopListenerList.GetNext(listener))
|
||||||
|
listener->WindowLookChanged(window, look);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
DesktopObservable::SetDecoratorSettings(Window* window,
|
DesktopObservable::SetDecoratorSettings(Window* window,
|
||||||
const BMessage& settings)
|
const BMessage& settings)
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include <Point.h>
|
#include <Point.h>
|
||||||
|
|
||||||
#include <ServerLink.h>
|
#include <ServerLink.h>
|
||||||
|
#include "Window.h"
|
||||||
|
|
||||||
|
|
||||||
class BMessage;
|
class BMessage;
|
||||||
@ -61,6 +62,8 @@ public:
|
|||||||
virtual void SizeLimitsChanged(Window* window,
|
virtual void SizeLimitsChanged(Window* window,
|
||||||
int32 minWidth, int32 maxWidth,
|
int32 minWidth, int32 maxWidth,
|
||||||
int32 minHeight, int32 maxHeight) = 0;
|
int32 minHeight, int32 maxHeight) = 0;
|
||||||
|
virtual void WindowLookChanged(Window* window,
|
||||||
|
window_look look) = 0;
|
||||||
|
|
||||||
virtual bool SetDecoratorSettings(Window* window,
|
virtual bool SetDecoratorSettings(Window* window,
|
||||||
const BMessage& settings) = 0;
|
const BMessage& settings) = 0;
|
||||||
@ -112,6 +115,8 @@ public:
|
|||||||
void NotifySizeLimitsChanged(Window* window,
|
void NotifySizeLimitsChanged(Window* window,
|
||||||
int32 minWidth, int32 maxWidth,
|
int32 minWidth, int32 maxWidth,
|
||||||
int32 minHeight, int32 maxHeight);
|
int32 minHeight, int32 maxHeight);
|
||||||
|
void NotifyWindowLookChanged(Window* window,
|
||||||
|
window_look look);
|
||||||
|
|
||||||
bool SetDecoratorSettings(Window* window,
|
bool SetDecoratorSettings(Window* window,
|
||||||
const BMessage& settings);
|
const BMessage& settings);
|
||||||
|
Loading…
Reference in New Issue
Block a user