Removed a couple stupid cursor-related bugs

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9403 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-10-18 21:31:15 +00:00
parent 20d6c8266b
commit 134d6bb787
2 changed files with 14 additions and 7 deletions
+9 -4
View File
@@ -156,16 +156,21 @@ void CursorManager::DeleteCursor(int32 token)
void CursorManager::RemoveAppCursors(team_id team)
{
Lock();
ServerCursor *temp;
for(int32 i=0; i<fCursorList->CountItems();i++)
int32 i=0;
ServerCursor *temp=(ServerCursor*)fCursorList->ItemAt(i);
while(temp)
{
temp=(ServerCursor*)fCursorList->ItemAt(i);
if(temp && temp->OwningTeam()==team)
{
fCursorList->RemoveItem(i);
delete temp;
}
else
{
i++;
}
temp=(ServerCursor*)fCursorList->ItemAt(i);
}
Unlock();
}
+5 -3
View File
@@ -153,9 +153,11 @@ ServerApp::~ServerApp(void)
delete fMsgSender;
fMsgSender=NULL;
if(fAppCursor)
delete fAppCursor;
// This shouldn't be necessary -- all cursors owned by the app
// should be cleaned up by RemoveAppCursors
// if(fAppCursor)
// delete fAppCursor;
cursormanager->RemoveAppCursors(fClientTeamID);
delete_sem(fLockSem);