* Fully switch to the Haiku message format so that it is also used for on-disk
storage. * Remove reduntant information from the header (field_count vs. fields_size). * Remove checksums previously used to validate the message passing by area mechanism. * Move variables that are purely used by the instance out of the header and into the BMessage object. * Use more sensible types for the different message fields. * Reduce some field sizes to realistic values. * Make size_t values into uint32 values so the message format will not change when later moving to 64 bits. * Pack the structures used for flat message storage so it doesn't change because of padding. * Fix message passing by area. It never worked because the created area was never actually filled with any data! * Some more allocation checks with graceful fallbacks (should be all now). * Some more checks for negative index values (should also be all now). * Make printing more inline with how the rest of the class works and make some of the output more consistent. * Also add the new unsigned types to PrintToStream() output. * Fix printing of unknown types and invalid BMessages, it would always have printed only the first entry respectively the same error. * Added some clarifying comments. * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32039 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1335,10 +1335,10 @@ BView::DragMessage(BMessage* message, BBitmap* image,
|
||||
|
||||
// TODO: create area and flatten message into that area!
|
||||
// send area info over port, not the actual message!
|
||||
int32 bufferSize = privateMessage.NativeFlattenedSize();
|
||||
int32 bufferSize = message->FlattenedSize();
|
||||
char* buffer = new(std::nothrow) char[bufferSize];
|
||||
if (buffer != NULL) {
|
||||
privateMessage.NativeFlatten(buffer, bufferSize);
|
||||
message->Flatten(buffer, bufferSize);
|
||||
|
||||
fOwner->fLink->StartMessage(AS_VIEW_DRAG_IMAGE);
|
||||
fOwner->fLink->Attach<int32>(image->_ServerToken());
|
||||
|
||||
Reference in New Issue
Block a user