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:
@@ -2123,6 +2123,33 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
break;
|
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:
|
case AS_GET_ACCELERANT_INFO:
|
||||||
{
|
{
|
||||||
STRACE(("ServerApp %s: get accelerant info\n", Signature()));
|
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
|
status_t
|
||||||
Workspace::GetNextWindow(WindowLayer*& _window, BPoint& _leftTop)
|
Workspace::GetNextWindow(WindowLayer*& _window, BPoint& _leftTop)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class Workspace {
|
|||||||
~Workspace();
|
~Workspace();
|
||||||
|
|
||||||
const RGBColor& Color() const;
|
const RGBColor& Color() const;
|
||||||
|
void SetColor(const RGBColor& color, bool makeDefault);
|
||||||
bool IsCurrent() const
|
bool IsCurrent() const
|
||||||
{ return fCurrentWorkspace; }
|
{ return fCurrentWorkspace; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user