* 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user