Made Layer::RequestDraw actually request a screen update
Added a second method for ServerFont::SetFamilyAndStyle and added return codes Removed a couple memory leaks git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11262 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c20b5aa705
commit
fac4ccbae7
|
@ -579,6 +579,7 @@ void Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
|||
fDriver->ConstrainClippingRegion(&fUpdateReg);
|
||||
fDriver->FillRect(fUpdateReg.Frame(), fLayerData->viewcolor);
|
||||
fDriver->ConstrainClippingRegion(NULL);
|
||||
SendUpdateMsg();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -173,9 +173,28 @@ void ServerFont::Height(font_height *fh)
|
|||
|
||||
/*!
|
||||
\brief Sets the ServerFont instance to whatever font is specified
|
||||
\param fontID the combination of family and style ID numbers
|
||||
\param familyID ID number of the family to set
|
||||
\param styleID ID number of the style to set
|
||||
\return B_OK if successful, B_ERROR if not
|
||||
*/
|
||||
void ServerFont::SetFamilyAndStyle(const uint32 &fontID)
|
||||
status_t ServerFont::SetFamilyAndStyle(const uint16 &familyID,const uint16 &styleID)
|
||||
{
|
||||
fontserver->Lock();
|
||||
FontStyle *sty=fontserver->GetStyle(familyID,styleID);
|
||||
fontserver->Unlock();
|
||||
if(!sty)
|
||||
return B_ERROR;
|
||||
|
||||
fStyle=sty;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Sets the ServerFont instance to whatever font is specified
|
||||
\param fontID the combination of family and style ID numbers
|
||||
\return B_OK if successful, B_ERROR if not
|
||||
*/
|
||||
status_t ServerFont::SetFamilyAndStyle(const uint32 &fontID)
|
||||
{
|
||||
uint16 style = fontID & 0xFFFF;
|
||||
uint16 family = (fontID & 0xFFFF0000) >> 16;
|
||||
|
@ -183,8 +202,11 @@ void ServerFont::SetFamilyAndStyle(const uint32 &fontID)
|
|||
fontserver->Lock();
|
||||
FontStyle *sty=fontserver->GetStyle(family,style);
|
||||
fontserver->Unlock();
|
||||
if(sty)
|
||||
if(!sty)
|
||||
return B_ERROR;
|
||||
|
||||
fStyle=sty;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -2295,7 +2295,7 @@ void ServerWindow::SendMessageToClient(const BMessage* msg) const
|
|||
else
|
||||
printf("PANIC: ServerWindow %s: can't flatten message in 'SendMessageToClient()'\n", fTitle.String());
|
||||
|
||||
delete buffer;
|
||||
delete [] buffer;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ void SendMessage(port_id port, BMessage *message, int32 target)
|
|||
if(message->Flatten(buffer,flatsize)==B_OK)
|
||||
write_port(port, message->what, buffer,flatsize);
|
||||
|
||||
delete buffer;
|
||||
delete [] buffer;
|
||||
delete message;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue