very small changes: ordered code and liminated error because of the change if Decorator.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5363 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -477,10 +477,11 @@ void Screen::SetActiveWindow(ServerWindow *win)
|
||||
Workspace *wksp=win->GetWorkspace();
|
||||
if(wksp->GetScreen()!=this)
|
||||
return;
|
||||
set_active_winborder(win->_winborder);
|
||||
// set_active_winborder(win->_winborder);
|
||||
}
|
||||
else{
|
||||
// set_active_winborder(NULL);
|
||||
}
|
||||
else
|
||||
set_active_winborder(NULL);
|
||||
_activewin=win;
|
||||
}
|
||||
|
||||
|
||||
@@ -279,8 +279,7 @@ STRACE(("ServerWindow %s: Show\n",_title->String()));
|
||||
if(_winborder)
|
||||
{
|
||||
_winborder->Show();
|
||||
_winborder->SetFocus(true);
|
||||
// _winborder->UpdateRegions(true);
|
||||
// _winborder->SetFocus(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,6 +302,38 @@ bool ServerWindow::IsHidden(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ServerWindow::Minimize(bool status){
|
||||
bool sendMessages = false;
|
||||
|
||||
if (status){
|
||||
if ( !IsHidden() ){
|
||||
Hide();
|
||||
sendMessages = true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if ( IsHidden() ){
|
||||
Show();
|
||||
sendMessages = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( sendMessages ){
|
||||
BMessage msg;
|
||||
msg.what = B_MINIMIZE;
|
||||
msg.AddInt64("when", real_time_clock_usecs());
|
||||
msg.AddBool("minimize", status );
|
||||
|
||||
SendMessageToClient( &msg );
|
||||
|
||||
// TODO: notify tracker! how???
|
||||
}
|
||||
}
|
||||
|
||||
void ServerWindow::Zoom(){
|
||||
// TODO: implement;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Handles focus and redrawing when changing focus states
|
||||
|
||||
@@ -2029,10 +2060,10 @@ void ServerWindow::HandleMouseEvent(PortMessage *msg)
|
||||
msg->Read(&y);
|
||||
BPoint pt(x,y);
|
||||
|
||||
set_is_sliding_tab(false);
|
||||
/* set_is_sliding_tab(false);
|
||||
set_is_moving_window(false);
|
||||
set_is_resizing_window(false);
|
||||
_winborder = WindowContainsPoint(pt);
|
||||
*/ _winborder = WindowContainsPoint(pt);
|
||||
active_winborder=NULL;
|
||||
if(_winborder)
|
||||
{
|
||||
@@ -2061,7 +2092,7 @@ void ServerWindow::HandleMouseEvent(PortMessage *msg)
|
||||
msg->Read(&dummy);
|
||||
msg->Read(&x);
|
||||
msg->Read(&y);
|
||||
BPoint pt(x,y);
|
||||
/* BPoint pt(x,y);
|
||||
|
||||
if(is_moving_window() || is_resizing_window() || is_sliding_tab())
|
||||
{
|
||||
@@ -2076,7 +2107,7 @@ void ServerWindow::HandleMouseEvent(PortMessage *msg)
|
||||
_winborder->MouseMoved((int8*)msg->Buffer());
|
||||
}
|
||||
}
|
||||
break;
|
||||
*/ break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
||||
@@ -64,9 +64,11 @@ class Layer;
|
||||
class ServerWindow
|
||||
{
|
||||
public:
|
||||
ServerWindow(BRect rect, const char *string, uint32 wlook, uint32 wfeel,
|
||||
uint32 wflags, ServerApp *winapp, port_id winport,
|
||||
port_id looperPort, uint32 index, int32 handlerID);
|
||||
ServerWindow(BRect rect, const char *string,
|
||||
uint32 wlook, uint32 wfeel, uint32 wflags,
|
||||
ServerApp *winapp, port_id winport,
|
||||
port_id looperPort, uint32 index,
|
||||
int32 handlerID);
|
||||
~ServerWindow(void);
|
||||
|
||||
void ReplaceDecorator(void);
|
||||
@@ -76,6 +78,8 @@ public:
|
||||
void Show(void);
|
||||
void Hide(void);
|
||||
bool IsHidden(void);
|
||||
void Minimize(bool status);
|
||||
void Zoom(void);
|
||||
void SetFocus(bool value);
|
||||
bool HasFocus(void);
|
||||
void RequestDraw(BRect rect);
|
||||
@@ -109,6 +113,7 @@ public:
|
||||
|
||||
Layer* FindLayer(const Layer* start, int32 token) const;
|
||||
void SendMessageToClient( const BMessage* msg ) const;
|
||||
|
||||
protected:
|
||||
friend class ServerApp;
|
||||
friend class WinBorder;
|
||||
@@ -116,7 +121,9 @@ protected:
|
||||
friend class Layer;
|
||||
|
||||
BString *_title;
|
||||
int32 _look, _feel, _flags;
|
||||
int32 _look,
|
||||
_feel,
|
||||
_flags;
|
||||
uint32 _workspace_index;
|
||||
Workspace *_workspace;
|
||||
bool _active;
|
||||
@@ -127,13 +134,13 @@ protected:
|
||||
thread_id _monitorthread;
|
||||
port_id _receiver; // Messages from window
|
||||
port_id _sender; // Messages to window
|
||||
PortLink *_winlink,*_applink;
|
||||
PortLink *_winlink,
|
||||
*_applink;
|
||||
BLocker _locker;
|
||||
BRect _frame;
|
||||
uint32 _token;
|
||||
int32 _handlertoken;
|
||||
|
||||
// ADI:
|
||||
BSession *ses;
|
||||
port_id winLooperPort;
|
||||
Layer *top_layer;
|
||||
|
||||
Reference in New Issue
Block a user