Introduced Layer::Activated() hook function. Moved some functionality from RootLayer to WinBorder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14565 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a577cf141f
commit
31ec092be1
@ -1194,6 +1194,12 @@ Layer::WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces)
|
|||||||
// Empty
|
// Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Layer::Activated(bool active)
|
||||||
|
{
|
||||||
|
// Empty
|
||||||
|
}
|
||||||
|
|
||||||
// BoundsOrigin
|
// BoundsOrigin
|
||||||
BPoint
|
BPoint
|
||||||
Layer::BoundsOrigin() const
|
Layer::BoundsOrigin() const
|
||||||
|
@ -171,6 +171,7 @@ class Layer {
|
|||||||
|
|
||||||
virtual void WorkspaceActivated(int32 index, bool active);
|
virtual void WorkspaceActivated(int32 index, bool active);
|
||||||
virtual void WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces);
|
virtual void WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces);
|
||||||
|
virtual void Activated(bool active);
|
||||||
|
|
||||||
BPoint BoundsOrigin() const; // BoundsFrameDiff()?
|
BPoint BoundsOrigin() const; // BoundsFrameDiff()?
|
||||||
float Scale() const;
|
float Scale() const;
|
||||||
|
@ -828,16 +828,10 @@ RootLayer::RevealNewWMState(Workspace::State &oldWMState)
|
|||||||
// floating window having focus.
|
// floating window having focus.
|
||||||
// send window activation messages
|
// send window activation messages
|
||||||
if (oldWMState.Active != fWMState.Active) {
|
if (oldWMState.Active != fWMState.Active) {
|
||||||
if (oldWMState.Active && oldWMState.Active->Window()) {
|
if (oldWMState.Active)
|
||||||
BMessage msg(B_WINDOW_ACTIVATED);
|
oldWMState.Active->Activated(false);
|
||||||
msg.AddBool("active", false);
|
if (fWMState.Active)
|
||||||
oldWMState.Active->Window()->SendMessageToClient(&msg, B_NULL_TOKEN, false);
|
fWMState.Active->Activated(true);
|
||||||
}
|
|
||||||
if (fWMState.Active && fWMState.Active->Window()) {
|
|
||||||
BMessage msg(B_WINDOW_ACTIVATED);
|
|
||||||
msg.AddBool("active", true);
|
|
||||||
fWMState.Active->Window()->SendMessageToClient(&msg, B_NULL_TOKEN, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate the region that must be invalidated/redrawn
|
// calculate the region that must be invalidated/redrawn
|
||||||
|
@ -655,6 +655,14 @@ WinBorder::WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces)
|
|||||||
Window()->SendMessageToClient(&changedMsg, B_NULL_TOKEN, false);
|
Window()->SendMessageToClient(&changedMsg, B_NULL_TOKEN, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
WinBorder::Activated(bool active)
|
||||||
|
{
|
||||||
|
BMessage msg(B_WINDOW_ACTIVATED);
|
||||||
|
msg.AddBool("active", false);
|
||||||
|
Window()->SendMessageToClient(&msg, B_NULL_TOKEN, false);
|
||||||
|
}
|
||||||
|
|
||||||
// SetTabLocation
|
// SetTabLocation
|
||||||
void
|
void
|
||||||
WinBorder::SetTabLocation(float location)
|
WinBorder::SetTabLocation(float location)
|
||||||
|
@ -90,6 +90,7 @@ class WinBorder : public Layer {
|
|||||||
|
|
||||||
virtual void WorkspaceActivated(int32 index, bool active);
|
virtual void WorkspaceActivated(int32 index, bool active);
|
||||||
virtual void WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces);
|
virtual void WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces);
|
||||||
|
virtual void Activated(bool active);
|
||||||
|
|
||||||
void UpdateColors();
|
void UpdateColors();
|
||||||
void UpdateDecorator();
|
void UpdateDecorator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user