Cleaned up AS_SET_CURSOR a bit: it now just calls Desktop::SetCursor(), and no longer
HWInterface::SetCursor() directly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16677 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -933,24 +933,22 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
// 2) int32 token ID of the cursor to set
|
// 2) int32 token ID of the cursor to set
|
||||||
// 3) port_id port to receive a reply. Only exists if the sync flag is true.
|
// 3) port_id port to receive a reply. Only exists if the sync flag is true.
|
||||||
bool sync;
|
bool sync;
|
||||||
int32 token = B_NULL_TOKEN;
|
int32 token;
|
||||||
|
|
||||||
link.Read<bool>(&sync);
|
link.Read<bool>(&sync);
|
||||||
link.Read<int32>(&token);
|
if (link.Read<int32>(&token) != B_OK)
|
||||||
|
break;
|
||||||
|
|
||||||
ServerCursor* oldCursor = fAppCursor;
|
ServerCursor* oldCursor = fAppCursor;
|
||||||
fAppCursor = fDesktop->GetCursorManager().FindCursor(token);
|
fAppCursor = fDesktop->GetCursorManager().FindCursor(token);
|
||||||
if (fAppCursor != NULL) {
|
if (fAppCursor != NULL) {
|
||||||
fAppCursor->Acquire();
|
fAppCursor->Acquire();
|
||||||
// TODO: This is wrong: We need to take view cursors into account here!
|
|
||||||
fDesktop->HWInterface()->SetCursor(fAppCursor);
|
fDesktop->HWInterface()->SetCursor(fAppCursor);
|
||||||
} else {
|
|
||||||
// if the new cursor doesn't exist, we just set the default cursor
|
|
||||||
// TODO: This is wrong: We need to take view cursors into account here!
|
|
||||||
fDesktop->HWInterface()->SetCursor(
|
|
||||||
fDesktop->GetCursorManager().GetCursor(B_CURSOR_DEFAULT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: This is wrong: We need to take view cursors into account here!
|
||||||
|
fDesktop->SetCursor(fAppCursor);
|
||||||
|
|
||||||
if (oldCursor != NULL)
|
if (oldCursor != NULL)
|
||||||
oldCursor->Release();
|
oldCursor->Release();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user