* small cleanups

* reworded Activate and commented out all code
  that actually tries to change the cusor shape


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15917 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2006-01-11 22:27:51 +00:00
parent d72cb8f8d7
commit b073091ab3
+18 -6
View File
@@ -186,8 +186,9 @@ ServerApp::~ServerApp()
gBitmapManager->DeleteBitmap(static_cast<ServerBitmap *>(fBitmapList.ItemAt(i))); gBitmapManager->DeleteBitmap(static_cast<ServerBitmap *>(fBitmapList.ItemAt(i)));
} }
for (int32 i = 0; i < fPictureList.CountItems(); i++) { int32 pictureCount = fPictureList.CountItems();
delete (ServerPicture*)fPictureList.ItemAt(i); for (int32 i = 0; i < pictureCount; i++) {
delete (ServerPicture*)fPictureList.ItemAtFast(i);
} }
fDesktop->GetCursorManager().RemoveAppCursors(fClientTeam); fDesktop->GetCursorManager().RemoveAppCursors(fClientTeam);
@@ -281,17 +282,27 @@ ServerApp::SendMessageToClient(BMessage *msg) const
void void
ServerApp::Activate(bool value) ServerApp::Activate(bool value)
{ {
if (fIsActive == value)
return;
// TODO: send some message to the client?!?
fIsActive = value; fIsActive = value;
if (fIsActive) {
SetAppCursor(); SetAppCursor();
} }
}
//! Sets the cursor to the application cursor, if any. //! Sets the cursor to the application cursor, if any.
void void
ServerApp::SetAppCursor() ServerApp::SetAppCursor()
{ {
if (fAppCursor) // TODO: look into custom cursors...
fDesktop->HWInterface()->SetCursor(fAppCursor); // if (fAppCursor)
// fDesktop->HWInterface()->SetCursor(fAppCursor);
fDesktop->HWInterface()->SetCursorVisible(!fCursorHidden); fDesktop->HWInterface()->SetCursorVisible(!fCursorHidden);
} }
@@ -919,8 +930,8 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
fDesktop->HWInterface()->SetCursor(cursor); fDesktop->HWInterface()->SetCursor(cursor);
if (sync) { if (sync) {
// the application is expecting a reply, but plans to do literally nothing // the application is expecting a reply so that it
// with the data, so we'll just reuse the cursor token variable // knows the cursor shape has truely changed
fLink.StartMessage(B_OK); fLink.StartMessage(B_OK);
fLink.Flush(); fLink.Flush();
} }
@@ -968,6 +979,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
fDesktop->GetCursorManager().DeleteCursor(ctoken); fDesktop->GetCursorManager().DeleteCursor(ctoken);
break; break;
} }
case AS_GET_SCROLLBAR_INFO: case AS_GET_SCROLLBAR_INFO:
{ {
STRACE(("ServerApp %s: Get ScrollBar info\n", Signature())); STRACE(("ServerApp %s: Get ScrollBar info\n", Signature()));