* made fLastViewToken member equal with top_view's token. This avoids an unnecessary message to be sent to app_server.
* added some debugging code? * other changes... git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4685 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -58,6 +58,12 @@
|
|||||||
|
|
||||||
// Local Defines ---------------------------------------------------------------
|
// Local Defines ---------------------------------------------------------------
|
||||||
#define DEBUG_WIN
|
#define DEBUG_WIN
|
||||||
|
#ifdef DEBUG_WIN
|
||||||
|
# include <stdio.h>
|
||||||
|
# define STRACE(x) printf x
|
||||||
|
#else
|
||||||
|
# define STRACE(x) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Globals ---------------------------------------------------------------------
|
// Globals ---------------------------------------------------------------------
|
||||||
static property_info windowPropInfo[] =
|
static property_info windowPropInfo[] =
|
||||||
@@ -1930,6 +1936,7 @@ void BWindow::InitData( BRect frame,
|
|||||||
fMaxWindHeight = 32768.0;
|
fMaxWindHeight = 32768.0;
|
||||||
fMaxWindWidth = 32768.0;
|
fMaxWindWidth = 32768.0;
|
||||||
|
|
||||||
|
fLastViewToken = B_NULL_TOKEN;
|
||||||
// TODO: other initializations!
|
// TODO: other initializations!
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1980,6 +1987,7 @@ void BWindow::InitData( BRect frame,
|
|||||||
|
|
||||||
// build and register top_view with app_server
|
// build and register top_view with app_server
|
||||||
BuildTopView();
|
BuildTopView();
|
||||||
|
// top_view->PrintToStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@@ -2215,7 +2223,7 @@ void BWindow::BuildTopView(){
|
|||||||
top_view = new BView( fFrame.OffsetToCopy(0,0), "top_view",
|
top_view = new BView( fFrame.OffsetToCopy(0,0), "top_view",
|
||||||
B_FOLLOW_ALL, B_WILL_DRAW);
|
B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
top_view->top_level_view = true;
|
top_view->top_level_view = true;
|
||||||
top_view->fShowLevel = 1;
|
//top_view->fShowLevel = 1;
|
||||||
|
|
||||||
// set top_view's owner, add it to window's eligible handler list
|
// set top_view'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.
|
||||||
@@ -2230,6 +2238,8 @@ void BWindow::BuildTopView(){
|
|||||||
session->WriteString( top_view->Name() );
|
session->WriteString( top_view->Name() );
|
||||||
// we DO NOT send our current state; the server knows the default values!
|
// we DO NOT send our current state; the server knows the default values!
|
||||||
session->Sync();
|
session->Sync();
|
||||||
|
|
||||||
|
fLastViewToken = _get_object_token_( top_view );
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@@ -3275,6 +3285,7 @@ void BWindow::_ReservedWindow8() { }
|
|||||||
void BWindow::PrintToStream() const{
|
void BWindow::PrintToStream() const{
|
||||||
printf("BWindow '%s' data:
|
printf("BWindow '%s' data:
|
||||||
Title = %s
|
Title = %s
|
||||||
|
Token = %ld
|
||||||
InTransaction = %s
|
InTransaction = %s
|
||||||
Active = %s
|
Active = %s
|
||||||
fShowLevel = %d
|
fShowLevel = %d
|
||||||
@@ -3290,6 +3301,7 @@ void BWindow::PrintToStream() const{
|
|||||||
# of shortcuts = %ld",
|
# of shortcuts = %ld",
|
||||||
Name(),
|
Name(),
|
||||||
fTitle!=NULL? fTitle:"NULL",
|
fTitle!=NULL? fTitle:"NULL",
|
||||||
|
_get_object_token_(this),
|
||||||
fInTransaction==true? "yes":"no",
|
fInTransaction==true? "yes":"no",
|
||||||
fActive==true? "yes":"no",
|
fActive==true? "yes":"no",
|
||||||
fShowLevel,
|
fShowLevel,
|
||||||
@@ -3362,3 +3374,9 @@ TODO list:
|
|||||||
*) call hook functions: MenusBeginning, MenusEnded. Add menu activation code.
|
*) call hook functions: MenusBeginning, MenusEnded. Add menu activation code.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
@log
|
||||||
|
* made fLastViewToken member equal with top_view's token. This avoids an unnecessary message to be sent to app_server.
|
||||||
|
* added some debugging code?
|
||||||
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user