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
src/servers/app
@ -1194,6 +1194,12 @@ Layer::WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces)
|
||||
// Empty
|
||||
}
|
||||
|
||||
void
|
||||
Layer::Activated(bool active)
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
// BoundsOrigin
|
||||
BPoint
|
||||
Layer::BoundsOrigin() const
|
||||
|
@ -171,6 +171,7 @@ class Layer {
|
||||
|
||||
virtual void WorkspaceActivated(int32 index, bool active);
|
||||
virtual void WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces);
|
||||
virtual void Activated(bool active);
|
||||
|
||||
BPoint BoundsOrigin() const; // BoundsFrameDiff()?
|
||||
float Scale() const;
|
||||
|
@ -828,16 +828,10 @@ RootLayer::RevealNewWMState(Workspace::State &oldWMState)
|
||||
// floating window having focus.
|
||||
// send window activation messages
|
||||
if (oldWMState.Active != fWMState.Active) {
|
||||
if (oldWMState.Active && oldWMState.Active->Window()) {
|
||||
BMessage msg(B_WINDOW_ACTIVATED);
|
||||
msg.AddBool("active", false);
|
||||
oldWMState.Active->Window()->SendMessageToClient(&msg, B_NULL_TOKEN, false);
|
||||
}
|
||||
if (fWMState.Active && fWMState.Active->Window()) {
|
||||
BMessage msg(B_WINDOW_ACTIVATED);
|
||||
msg.AddBool("active", true);
|
||||
fWMState.Active->Window()->SendMessageToClient(&msg, B_NULL_TOKEN, false);
|
||||
}
|
||||
if (oldWMState.Active)
|
||||
oldWMState.Active->Activated(false);
|
||||
if (fWMState.Active)
|
||||
fWMState.Active->Activated(true);
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
void
|
||||
WinBorder::Activated(bool active)
|
||||
{
|
||||
BMessage msg(B_WINDOW_ACTIVATED);
|
||||
msg.AddBool("active", false);
|
||||
Window()->SendMessageToClient(&msg, B_NULL_TOKEN, false);
|
||||
}
|
||||
|
||||
// SetTabLocation
|
||||
void
|
||||
WinBorder::SetTabLocation(float location)
|
||||
|
@ -90,6 +90,7 @@ class WinBorder : public Layer {
|
||||
|
||||
virtual void WorkspaceActivated(int32 index, bool active);
|
||||
virtual void WorkspacesChanged(uint32 oldWorkspaces, uint32 newWorkspaces);
|
||||
virtual void Activated(bool active);
|
||||
|
||||
void UpdateColors();
|
||||
void UpdateDecorator();
|
||||
|
Loading…
x
Reference in New Issue
Block a user