From ed45b6652a428260b27986ee487ea2887b23471c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 9 Mar 2006 16:00:36 +0000 Subject: [PATCH] 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 --- src/servers/app/ServerApp.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/servers/app/ServerApp.cpp b/src/servers/app/ServerApp.cpp index bcca14e84b..1ba7eda1db 100644 --- a/src/servers/app/ServerApp.cpp +++ b/src/servers/app/ServerApp.cpp @@ -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(&sync); - link.Read(&token); + if (link.Read(&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();