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:
parent
52b3e056cd
commit
ed45b6652a
@ -933,24 +933,22 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
// 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.
|
||||
bool sync;
|
||||
int32 token = B_NULL_TOKEN;
|
||||
int32 token;
|
||||
|
||||
link.Read<bool>(&sync);
|
||||
link.Read<int32>(&token);
|
||||
if (link.Read<int32>(&token) != B_OK)
|
||||
break;
|
||||
|
||||
ServerCursor* oldCursor = fAppCursor;
|
||||
fAppCursor = fDesktop->GetCursorManager().FindCursor(token);
|
||||
if (fAppCursor != NULL) {
|
||||
fAppCursor->Acquire();
|
||||
// TODO: This is wrong: We need to take view cursors into account here!
|
||||
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)
|
||||
oldCursor->Release();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user