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();
|
Workspace *wksp=win->GetWorkspace();
|
||||||
if(wksp->GetScreen()!=this)
|
if(wksp->GetScreen()!=this)
|
||||||
return;
|
return;
|
||||||
set_active_winborder(win->_winborder);
|
// set_active_winborder(win->_winborder);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// set_active_winborder(NULL);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
set_active_winborder(NULL);
|
|
||||||
_activewin=win;
|
_activewin=win;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -279,8 +279,7 @@ STRACE(("ServerWindow %s: Show\n",_title->String()));
|
|||||||
if(_winborder)
|
if(_winborder)
|
||||||
{
|
{
|
||||||
_winborder->Show();
|
_winborder->Show();
|
||||||
_winborder->SetFocus(true);
|
// _winborder->SetFocus(true);
|
||||||
// _winborder->UpdateRegions(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,6 +302,38 @@ bool ServerWindow::IsHidden(void)
|
|||||||
return true;
|
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
|
\brief Handles focus and redrawing when changing focus states
|
||||||
|
|
||||||
@@ -2029,10 +2060,10 @@ void ServerWindow::HandleMouseEvent(PortMessage *msg)
|
|||||||
msg->Read(&y);
|
msg->Read(&y);
|
||||||
BPoint pt(x,y);
|
BPoint pt(x,y);
|
||||||
|
|
||||||
set_is_sliding_tab(false);
|
/* set_is_sliding_tab(false);
|
||||||
set_is_moving_window(false);
|
set_is_moving_window(false);
|
||||||
set_is_resizing_window(false);
|
set_is_resizing_window(false);
|
||||||
_winborder = WindowContainsPoint(pt);
|
*/ _winborder = WindowContainsPoint(pt);
|
||||||
active_winborder=NULL;
|
active_winborder=NULL;
|
||||||
if(_winborder)
|
if(_winborder)
|
||||||
{
|
{
|
||||||
@@ -2061,7 +2092,7 @@ void ServerWindow::HandleMouseEvent(PortMessage *msg)
|
|||||||
msg->Read(&dummy);
|
msg->Read(&dummy);
|
||||||
msg->Read(&x);
|
msg->Read(&x);
|
||||||
msg->Read(&y);
|
msg->Read(&y);
|
||||||
BPoint pt(x,y);
|
/* BPoint pt(x,y);
|
||||||
|
|
||||||
if(is_moving_window() || is_resizing_window() || is_sliding_tab())
|
if(is_moving_window() || is_resizing_window() || is_sliding_tab())
|
||||||
{
|
{
|
||||||
@@ -2076,7 +2107,7 @@ void ServerWindow::HandleMouseEvent(PortMessage *msg)
|
|||||||
_winborder->MouseMoved((int8*)msg->Buffer());
|
_winborder->MouseMoved((int8*)msg->Buffer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
*/ break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,9 +64,11 @@ class Layer;
|
|||||||
class ServerWindow
|
class ServerWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ServerWindow(BRect rect, const char *string, uint32 wlook, uint32 wfeel,
|
ServerWindow(BRect rect, const char *string,
|
||||||
uint32 wflags, ServerApp *winapp, port_id winport,
|
uint32 wlook, uint32 wfeel, uint32 wflags,
|
||||||
port_id looperPort, uint32 index, int32 handlerID);
|
ServerApp *winapp, port_id winport,
|
||||||
|
port_id looperPort, uint32 index,
|
||||||
|
int32 handlerID);
|
||||||
~ServerWindow(void);
|
~ServerWindow(void);
|
||||||
|
|
||||||
void ReplaceDecorator(void);
|
void ReplaceDecorator(void);
|
||||||
@@ -76,6 +78,8 @@ public:
|
|||||||
void Show(void);
|
void Show(void);
|
||||||
void Hide(void);
|
void Hide(void);
|
||||||
bool IsHidden(void);
|
bool IsHidden(void);
|
||||||
|
void Minimize(bool status);
|
||||||
|
void Zoom(void);
|
||||||
void SetFocus(bool value);
|
void SetFocus(bool value);
|
||||||
bool HasFocus(void);
|
bool HasFocus(void);
|
||||||
void RequestDraw(BRect rect);
|
void RequestDraw(BRect rect);
|
||||||
@@ -109,6 +113,7 @@ public:
|
|||||||
|
|
||||||
Layer* FindLayer(const Layer* start, int32 token) const;
|
Layer* FindLayer(const Layer* start, int32 token) const;
|
||||||
void SendMessageToClient( const BMessage* msg ) const;
|
void SendMessageToClient( const BMessage* msg ) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class ServerApp;
|
friend class ServerApp;
|
||||||
friend class WinBorder;
|
friend class WinBorder;
|
||||||
@@ -116,7 +121,9 @@ protected:
|
|||||||
friend class Layer;
|
friend class Layer;
|
||||||
|
|
||||||
BString *_title;
|
BString *_title;
|
||||||
int32 _look, _feel, _flags;
|
int32 _look,
|
||||||
|
_feel,
|
||||||
|
_flags;
|
||||||
uint32 _workspace_index;
|
uint32 _workspace_index;
|
||||||
Workspace *_workspace;
|
Workspace *_workspace;
|
||||||
bool _active;
|
bool _active;
|
||||||
@@ -127,13 +134,13 @@ protected:
|
|||||||
thread_id _monitorthread;
|
thread_id _monitorthread;
|
||||||
port_id _receiver; // Messages from window
|
port_id _receiver; // Messages from window
|
||||||
port_id _sender; // Messages to window
|
port_id _sender; // Messages to window
|
||||||
PortLink *_winlink,*_applink;
|
PortLink *_winlink,
|
||||||
|
*_applink;
|
||||||
BLocker _locker;
|
BLocker _locker;
|
||||||
BRect _frame;
|
BRect _frame;
|
||||||
uint32 _token;
|
uint32 _token;
|
||||||
int32 _handlertoken;
|
int32 _handlertoken;
|
||||||
|
|
||||||
// ADI:
|
|
||||||
BSession *ses;
|
BSession *ses;
|
||||||
port_id winLooperPort;
|
port_id winLooperPort;
|
||||||
Layer *top_layer;
|
Layer *top_layer;
|
||||||
|
|||||||
Reference in New Issue
Block a user