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:
@@ -9,6 +9,7 @@
|
|||||||
* Andrej Spielmann <[email protected]>
|
* Andrej Spielmann <[email protected]>
|
||||||
* Brecht Machiels <[email protected]>
|
* Brecht Machiels <[email protected]>
|
||||||
* Clemens Zeidler <[email protected]>
|
* Clemens Zeidler <[email protected]>
|
||||||
|
* Ingo Weinhold <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -605,14 +606,32 @@ Desktop::SetCursor(ServerCursor* newCursor)
|
|||||||
if (newCursor == NULL)
|
if (newCursor == NULL)
|
||||||
newCursor = fCursorManager.GetCursor(B_CURSOR_ID_SYSTEM_DEFAULT);
|
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
|
ServerCursorReference
|
||||||
Desktop::Cursor() const
|
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);
|
void SetCursor(ServerCursor* cursor);
|
||||||
ServerCursorReference Cursor() const;
|
ServerCursorReference Cursor() const;
|
||||||
|
void SetManagementCursor(ServerCursor* newCursor);
|
||||||
|
|
||||||
void SetLastMouseState(const BPoint& position,
|
void SetLastMouseState(const BPoint& position,
|
||||||
int32 buttons, Window* windowUnderMouse);
|
int32 buttons, Window* windowUnderMouse);
|
||||||
// for use by the mouse filter only
|
// for use by the mouse filter only
|
||||||
@@ -330,6 +332,8 @@ private:
|
|||||||
BLocker fWorkspacesLock;
|
BLocker fWorkspacesLock;
|
||||||
|
|
||||||
CursorManager fCursorManager;
|
CursorManager fCursorManager;
|
||||||
|
ServerCursorReference fCursor;
|
||||||
|
ServerCursorReference fManagementCursor;
|
||||||
|
|
||||||
MultiLocker fWindowLock;
|
MultiLocker fWindowLock;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user