As the comment says, deleting the cursor is not necessary.
But since every single cursor is owned by a team - why the cursor manager? I must overlook something... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13385 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3870c9f18f
commit
c030c6fa68
@ -1,5 +1,5 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2001-2002, Haiku, Inc.
|
||||
// Copyright (c) 2001-2005, Haiku, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
@ -147,25 +147,21 @@ void CursorManager::DeleteCursor(int32 token)
|
||||
\brief Removes and deletes all of an application's cursors
|
||||
\param signature Signature to which the cursors belong
|
||||
*/
|
||||
void CursorManager::RemoveAppCursors(team_id team)
|
||||
void
|
||||
CursorManager::RemoveAppCursors(team_id team)
|
||||
{
|
||||
Lock();
|
||||
|
||||
int32 i=0;
|
||||
ServerCursor *temp=(ServerCursor*)fCursorList.ItemAt(i);
|
||||
while(temp)
|
||||
{
|
||||
if(temp && temp->OwningTeam()==team)
|
||||
{
|
||||
fCursorList.RemoveItem(i);
|
||||
delete temp;
|
||||
}
|
||||
else
|
||||
{
|
||||
i++;
|
||||
}
|
||||
temp=(ServerCursor*)fCursorList.ItemAt(i);
|
||||
ServerCursor *cursor;
|
||||
int32 index = 0;
|
||||
while ((cursor = (ServerCursor*)fCursorList.ItemAt(index)) != NULL) {
|
||||
if (cursor->OwningTeam() == team) {
|
||||
fCursorList.RemoveItem(index);
|
||||
delete cursor;
|
||||
} else
|
||||
index++;
|
||||
}
|
||||
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
@ -190,10 +190,6 @@ ServerApp::~ServerApp(void)
|
||||
delete static_cast<ServerPicture *>(fPictureList.ItemAt(i));
|
||||
}
|
||||
|
||||
// This shouldn't be necessary -- all cursors owned by the app
|
||||
// should be cleaned up by RemoveAppCursors
|
||||
// delete fAppCursor;
|
||||
|
||||
// although this isn't pretty, ATM we have only one RootLayer.
|
||||
// there should be a way that this ServerApp be attached to a particular
|
||||
// RootLayer to know which RootLayer's cursor to modify.
|
||||
|
Loading…
Reference in New Issue
Block a user