Implemented AS_SET_DESKTOP_COLOR - the desktop is not redrawn yet, but freshly exposed
areas will be filled with the new color. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15724 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
55fd3336b6
commit
fc6ec91732
@ -2123,6 +2123,33 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_SET_DESKTOP_COLOR:
|
||||
{
|
||||
STRACE(("ServerApp %s: set desktop color\n", Signature()));
|
||||
|
||||
rgb_color color;
|
||||
uint32 index;
|
||||
bool makeDefault;
|
||||
|
||||
link.Read<rgb_color>(&color);
|
||||
link.Read<uint32>(&index);
|
||||
if (link.Read<bool>(&makeDefault) != B_OK)
|
||||
break;
|
||||
|
||||
fDesktop->Lock();
|
||||
|
||||
// we're nice to our children (and also take the default case
|
||||
// into account which asks for the current workspace)
|
||||
if (index >= (uint32)kMaxWorkspaces)
|
||||
index = fDesktop->CurrentWorkspace();
|
||||
|
||||
Workspace workspace(*fDesktop, index);
|
||||
workspace.SetColor(color, makeDefault);
|
||||
|
||||
fDesktop->Unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_GET_ACCELERANT_INFO:
|
||||
{
|
||||
STRACE(("ServerApp %s: get accelerant info\n", Signature()));
|
||||
|
@ -90,6 +90,15 @@ Workspace::Color() const
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Workspace::SetColor(const RGBColor& color, bool makeDefault)
|
||||
{
|
||||
// TODO: support makeDefault
|
||||
// TODO: redraw desktop!
|
||||
fWorkspace.SetColor(color);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Workspace::GetNextWindow(WindowLayer*& _window, BPoint& _leftTop)
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ class Workspace {
|
||||
~Workspace();
|
||||
|
||||
const RGBColor& Color() const;
|
||||
void SetColor(const RGBColor& color, bool makeDefault);
|
||||
bool IsCurrent() const
|
||||
{ return fCurrentWorkspace; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user