* Cursors are now reference counted, so it shouldn't be possible anymore

to delete them accidently :)
* You should no longer call HWInterface::SetCursor(), but the new Desktop::SetCursor()
  if you need to change the cursor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16238 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-02-05 19:43:44 +00:00
parent aa1f543799
commit 195e980ef1
8 changed files with 72 additions and 36 deletions
+6 -1
View File
@@ -46,11 +46,16 @@ class ServerCursor : public ServerBitmap {
int32 Token() const
{ return fToken; }
void Acquire() { atomic_add(&fReferenceCount, 1); }
bool Release() { return atomic_add(&fReferenceCount, -1) == 1; }
private:
friend class CursorManager;
BPoint fHotSpot;
team_id fOwningTeam;
int32 fReferenceCount;
};
#endif // SERVER_CURSOR_H