Added method SetManagementCursor() that allows to set a cursor that overrides
the normal cursor set with SetCursor(). Intended for window management interactions. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39653 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
006f748565
commit
8689fe066a
@ -9,6 +9,7 @@
|
||||
* Andrej Spielmann <andrej.spielmann@seh.ox.ac.uk>
|
||||
* Brecht Machiels <brecht@mos6581.org>
|
||||
* Clemens Zeidler <haiku@clemens-zeidler.de>
|
||||
* Ingo Weinhold <ingo_weinhold@gmx.de>
|
||||
*/
|
||||
|
||||
|
||||
@ -605,14 +606,32 @@ Desktop::SetCursor(ServerCursor* newCursor)
|
||||
if (newCursor == NULL)
|
||||
newCursor = fCursorManager.GetCursor(B_CURSOR_ID_SYSTEM_DEFAULT);
|
||||
|
||||
HWInterface()->SetCursor(newCursor);
|
||||
if (newCursor == fCursor)
|
||||
return;
|
||||
|
||||
fCursor = newCursor;
|
||||
|
||||
if (fManagementCursor.Get() == NULL)
|
||||
HWInterface()->SetCursor(newCursor);
|
||||
}
|
||||
|
||||
|
||||
ServerCursorReference
|
||||
Desktop::Cursor() const
|
||||
{
|
||||
return HWInterface()->Cursor();
|
||||
return fCursor;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Desktop::SetManagementCursor(ServerCursor* newCursor)
|
||||
{
|
||||
if (newCursor == fManagementCursor)
|
||||
return;
|
||||
|
||||
fManagementCursor = newCursor;
|
||||
|
||||
HWInterface()->SetCursor(newCursor != NULL ? newCursor : fCursor.Get());
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,6 +91,8 @@ public:
|
||||
|
||||
void SetCursor(ServerCursor* cursor);
|
||||
ServerCursorReference Cursor() const;
|
||||
void SetManagementCursor(ServerCursor* newCursor);
|
||||
|
||||
void SetLastMouseState(const BPoint& position,
|
||||
int32 buttons, Window* windowUnderMouse);
|
||||
// for use by the mouse filter only
|
||||
@ -330,6 +332,8 @@ private:
|
||||
BLocker fWorkspacesLock;
|
||||
|
||||
CursorManager fCursorManager;
|
||||
ServerCursorReference fCursor;
|
||||
ServerCursorReference fManagementCursor;
|
||||
|
||||
MultiLocker fWindowLock;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user