Added server support for Workspaces() and SetWorkspaces()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12286 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1868,14 +1868,16 @@ status_t BWindow::GetWindowAlignment(window_alignment* mode,
|
|||||||
|
|
||||||
uint32 BWindow::Workspaces() const
|
uint32 BWindow::Workspaces() const
|
||||||
{
|
{
|
||||||
uint32 workspaces;
|
int32 rCode;
|
||||||
|
uint32 workspaces;
|
||||||
|
|
||||||
const_cast<BWindow*>(this)->Lock();
|
const_cast<BWindow*>(this)->Lock();
|
||||||
fLink->StartMessage( AS_GET_WORKSPACES );
|
fLink->StartMessage( AS_GET_WORKSPACES );
|
||||||
fLink->Flush();
|
fLink->Flush();
|
||||||
fLink->GetNextReply( (int32*)&workspaces );
|
fLink->GetNextReply(&rCode);
|
||||||
|
fLink->Read<uint32>(&workspaces);
|
||||||
const_cast<BWindow*>(this)->Unlock();
|
const_cast<BWindow*>(this)->Unlock();
|
||||||
|
// TODO: shouldn't we cache?
|
||||||
return workspaces;
|
return workspaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1883,10 +1885,13 @@ uint32 BWindow::Workspaces() const
|
|||||||
|
|
||||||
void BWindow::SetWorkspaces(uint32 workspaces)
|
void BWindow::SetWorkspaces(uint32 workspaces)
|
||||||
{
|
{
|
||||||
|
// TODO: don't forget about Tracker's background window.
|
||||||
|
if (fFeel != B_NORMAL_WINDOW_FEEL)
|
||||||
|
return;
|
||||||
|
|
||||||
Lock();
|
Lock();
|
||||||
fLink->StartMessage( AS_SET_WORKSPACES );
|
fLink->StartMessage(AS_SET_WORKSPACES);
|
||||||
fLink->Attach<int32>( (int32)workspaces );
|
fLink->Attach<uint32>(workspaces);
|
||||||
fLink->Flush();
|
fLink->Flush();
|
||||||
Unlock();
|
Unlock();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user