Reverted my change to usage of _get_object_token_(), it already means to use
a cached token... doh! Thanks Axel! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -622,7 +622,8 @@ private:
|
|||||||
void _PrintToStream();
|
void _PrintToStream();
|
||||||
void _PrintTree();
|
void _PrintTree();
|
||||||
|
|
||||||
int32 fServerToken;
|
int32 _unused_int1;
|
||||||
|
|
||||||
uint32 fFlags;
|
uint32 fFlags;
|
||||||
BPoint fParentOffset;
|
BPoint fParentOffset;
|
||||||
BWindow* fOwner;
|
BWindow* fOwner;
|
||||||
|
|||||||
+14
-13
@@ -1000,7 +1000,7 @@ BView::SetViewCursor(const BCursor *cursor, bool sync)
|
|||||||
|
|
||||||
ViewSetViewCursorInfo info;
|
ViewSetViewCursorInfo info;
|
||||||
info.cursorToken = cursor->fServerToken;
|
info.cursorToken = cursor->fServerToken;
|
||||||
info.viewToken = fServerToken;
|
info.viewToken = _get_object_token_(this);
|
||||||
info.sync = sync;
|
info.sync = sync;
|
||||||
|
|
||||||
BPrivate::AppServerLink link;
|
BPrivate::AppServerLink link;
|
||||||
@@ -3906,7 +3906,7 @@ BView::_RemoveSelf()
|
|||||||
if (owner != NULL && !fTopLevelView) {
|
if (owner != NULL && !fTopLevelView) {
|
||||||
// the top level view is deleted by the app_server automatically
|
// the top level view is deleted by the app_server automatically
|
||||||
owner->fLink->StartMessage(AS_VIEW_DELETE);
|
owner->fLink->StartMessage(AS_VIEW_DELETE);
|
||||||
owner->fLink->Attach<int32>(fServerToken);
|
owner->fLink->Attach<int32>(_get_object_token_(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
parent->InvalidateLayout();
|
parent->InvalidateLayout();
|
||||||
@@ -4302,7 +4302,7 @@ BView::Perform(perform_code code, void* _data)
|
|||||||
BView::GetHeightForWidth(data->width, &data->min, &data->max,
|
BView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||||
&data->preferred);
|
&data->preferred);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
case PERFORM_CODE_SET_LAYOUT:
|
case PERFORM_CODE_SET_LAYOUT:
|
||||||
{
|
{
|
||||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||||
@@ -4645,7 +4645,6 @@ BView::_InitData(BRect frame, const char *name, uint32 resizingMode,
|
|||||||
|
|
||||||
fParentOffset.Set(frame.left, frame.top);
|
fParentOffset.Set(frame.left, frame.top);
|
||||||
|
|
||||||
fServerToken = _get_object_token_(this);
|
|
||||||
fOwner = NULL;
|
fOwner = NULL;
|
||||||
fParent = NULL;
|
fParent = NULL;
|
||||||
fNextSibling = NULL;
|
fNextSibling = NULL;
|
||||||
@@ -4902,7 +4901,7 @@ BView::_CreateSelf()
|
|||||||
else
|
else
|
||||||
fOwner->fLink->StartMessage(AS_VIEW_CREATE);
|
fOwner->fLink->StartMessage(AS_VIEW_CREATE);
|
||||||
|
|
||||||
fOwner->fLink->Attach<int32>(fServerToken);
|
fOwner->fLink->Attach<int32>(_get_object_token_(this));
|
||||||
fOwner->fLink->AttachString(Name());
|
fOwner->fLink->AttachString(Name());
|
||||||
fOwner->fLink->Attach<BRect>(Frame());
|
fOwner->fLink->Attach<BRect>(Frame());
|
||||||
fOwner->fLink->Attach<BPoint>(LeftTop());
|
fOwner->fLink->Attach<BPoint>(LeftTop());
|
||||||
@@ -4915,7 +4914,7 @@ BView::_CreateSelf()
|
|||||||
if (fTopLevelView)
|
if (fTopLevelView)
|
||||||
fOwner->fLink->Attach<int32>(B_NULL_TOKEN);
|
fOwner->fLink->Attach<int32>(B_NULL_TOKEN);
|
||||||
else
|
else
|
||||||
fOwner->fLink->Attach<int32>(fParent->fServerToken);
|
fOwner->fLink->Attach<int32>(_get_object_token_(fParent));
|
||||||
fOwner->fLink->Flush();
|
fOwner->fLink->Flush();
|
||||||
|
|
||||||
_CheckOwnerLockAndSwitchCurrent();
|
_CheckOwnerLockAndSwitchCurrent();
|
||||||
@@ -5123,7 +5122,7 @@ BView::_Detach()
|
|||||||
if (fOwner->fLastMouseMovedView == this)
|
if (fOwner->fLastMouseMovedView == this)
|
||||||
fOwner->fLastMouseMovedView = NULL;
|
fOwner->fLastMouseMovedView = NULL;
|
||||||
|
|
||||||
if (fOwner->fLastViewToken == fServerToken)
|
if (fOwner->fLastViewToken == _get_object_token_(this))
|
||||||
fOwner->fLastViewToken = B_NULL_TOKEN;
|
fOwner->fLastViewToken = B_NULL_TOKEN;
|
||||||
|
|
||||||
_SetOwner(NULL);
|
_SetOwner(NULL);
|
||||||
@@ -5340,12 +5339,14 @@ BView::_CheckLock() const
|
|||||||
void
|
void
|
||||||
BView::_SwitchServerCurrentView() const
|
BView::_SwitchServerCurrentView() const
|
||||||
{
|
{
|
||||||
if (fOwner->fLastViewToken != fServerToken) {
|
int32 serverToken = _get_object_token_(this);
|
||||||
STRACE(("contacting app_server... sending token: %ld\n", fServerToken));
|
|
||||||
fOwner->fLink->StartMessage(AS_SET_CURRENT_VIEW);
|
|
||||||
fOwner->fLink->Attach<int32>(fServerToken);
|
|
||||||
|
|
||||||
fOwner->fLastViewToken = fServerToken;
|
if (fOwner->fLastViewToken != serverToken) {
|
||||||
|
STRACE(("contacting app_server... sending token: %ld\n", serverToken));
|
||||||
|
fOwner->fLink->StartMessage(AS_SET_CURRENT_VIEW);
|
||||||
|
fOwner->fLink->Attach<int32>(serverToken);
|
||||||
|
|
||||||
|
fOwner->fLastViewToken = serverToken;
|
||||||
} else {
|
} else {
|
||||||
STRACE(("quiet2\n"));
|
STRACE(("quiet2\n"));
|
||||||
}
|
}
|
||||||
@@ -5504,7 +5505,7 @@ BView::_PrintToStream()
|
|||||||
fNextSibling ? fNextSibling->Name() : "NULL",
|
fNextSibling ? fNextSibling->Name() : "NULL",
|
||||||
fPreviousSibling ? fPreviousSibling->Name() : "NULL",
|
fPreviousSibling ? fPreviousSibling->Name() : "NULL",
|
||||||
fOwner ? fOwner->Name() : "NULL",
|
fOwner ? fOwner->Name() : "NULL",
|
||||||
fServerToken,
|
_get_object_token_(this),
|
||||||
fFlags,
|
fFlags,
|
||||||
fParentOffset.x, fParentOffset.y,
|
fParentOffset.x, fParentOffset.y,
|
||||||
fBounds.left, fBounds.top, fBounds.right, fBounds.bottom,
|
fBounds.left, fBounds.top, fBounds.right, fBounds.bottom,
|
||||||
|
|||||||
@@ -2905,7 +2905,7 @@ BWindow::_CreateTopView()
|
|||||||
fTopView->fTopLevelView = true;
|
fTopView->fTopLevelView = true;
|
||||||
|
|
||||||
//inhibit check_lock()
|
//inhibit check_lock()
|
||||||
fLastViewToken = fTopView->fServerToken;
|
fLastViewToken = _get_object_token_(fTopView);
|
||||||
|
|
||||||
// set fTopView's owner, add it to window's eligible handler list
|
// set fTopView's owner, add it to window's eligible handler list
|
||||||
// and also set its next handler to be this window.
|
// and also set its next handler to be this window.
|
||||||
@@ -3089,7 +3089,7 @@ BWindow::_UnpackMessage(unpack_cookie& cookie, BMessage** _message,
|
|||||||
cookie.focus_token = _get_object_token_(*_target);
|
cookie.focus_token = _get_object_token_(*_target);
|
||||||
|
|
||||||
if (fLastMouseMovedView != NULL && cookie.message->what == B_MOUSE_MOVED)
|
if (fLastMouseMovedView != NULL && cookie.message->what == B_MOUSE_MOVED)
|
||||||
cookie.last_view_token = fLastMouseMovedView->fServerToken;
|
cookie.last_view_token = _get_object_token_(fLastMouseMovedView);
|
||||||
|
|
||||||
*_usePreferred = false;
|
*_usePreferred = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user