From b02917dae82b9f61bb0710d7639899204575e601 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sat, 4 Oct 2003 21:53:09 +0000 Subject: [PATCH] BitmapManager sets the _initialized flag to true when allocation is successful Added a forgotten opcode in DispatchMessage::AS_CREATE_BITMAP We can now allocate (and use) BBitmaps in applications! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4946 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/BitmapManager.cpp | 1 + src/servers/app/server/ServerApp.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/servers/app/server/BitmapManager.cpp b/src/servers/app/server/BitmapManager.cpp index da5082fe3e..2e9a4aee4d 100644 --- a/src/servers/app/server/BitmapManager.cpp +++ b/src/servers/app/server/BitmapManager.cpp @@ -130,6 +130,7 @@ ServerBitmap * BitmapManager::CreateBitmap(BRect bounds, color_space space, int3 bmp->_area=area_for(bmpbuffer); bmp->_buffer=bmpbuffer; bmp->_token=tokenizer.GetToken(); + bmp->_initialized=true; // calculate area offset area_info ai; diff --git a/src/servers/app/server/ServerApp.cpp b/src/servers/app/server/ServerApp.cpp index aedf727837..7c02703f59 100644 --- a/src/servers/app/server/ServerApp.cpp +++ b/src/servers/app/server/ServerApp.cpp @@ -425,7 +425,6 @@ void ServerApp::_DispatchMessage(PortMessage *msg) } case AS_CREATE_BITMAP: { -debugger(""); // Allocate a bitmap for an application // Attached Data: @@ -464,6 +463,7 @@ debugger(""); if(sbmp) { PortLink replylink(replyport); + replylink.SetOpCode(SERVER_TRUE); replylink.Attach(sbmp->Token()); replylink.Attach(sbmp->Area()); replylink.Attach(sbmp->AreaOffset());