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:
parent
cfc7b758e0
commit
5580db514e
@ -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,80 +64,87 @@ 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(void);
|
||||
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);
|
||||
void Quit(void);
|
||||
const char *GetTitle(void);
|
||||
ServerApp *GetApp(void);
|
||||
void Show(void);
|
||||
void Hide(void);
|
||||
bool IsHidden(void);
|
||||
void SetFocus(bool value);
|
||||
bool HasFocus(void);
|
||||
void RequestDraw(BRect rect);
|
||||
void RequestDraw(void);
|
||||
void ReplaceDecorator(void);
|
||||
void Quit(void);
|
||||
const char* GetTitle(void);
|
||||
ServerApp* GetApp(void);
|
||||
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);
|
||||
void RequestDraw(void);
|
||||
|
||||
void WorkspaceActivated(int32 workspace, bool active);
|
||||
void WorkspacesChanged(int32 oldone,int32 newone);
|
||||
void WindowActivated(bool active);
|
||||
void ScreenModeChanged(const BRect frame, const color_space cspace);
|
||||
void WorkspaceActivated(int32 workspace, bool active);
|
||||
void WorkspacesChanged(int32 oldone,int32 newone);
|
||||
void WindowActivated(bool active);
|
||||
void ScreenModeChanged(const BRect frame, const color_space cspace);
|
||||
|
||||
void SetFrame(const BRect &rect);
|
||||
BRect Frame(void);
|
||||
void SetFrame(const BRect &rect);
|
||||
BRect Frame(void);
|
||||
|
||||
status_t Lock(void);
|
||||
void Unlock(void);
|
||||
bool IsLocked(void);
|
||||
status_t Lock(void);
|
||||
void Unlock(void);
|
||||
bool IsLocked(void);
|
||||
|
||||
void DispatchMessage( int32 code );
|
||||
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
|
||||
static int32 MonitorWin(void *data);
|
||||
static void HandleMouseEvent(PortMessage *msg);
|
||||
static void HandleKeyEvent(int32 code, int8 *buffer);
|
||||
void DispatchMessage( int32 code );
|
||||
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
|
||||
static int32 MonitorWin(void *data);
|
||||
static void HandleMouseEvent(PortMessage *msg);
|
||||
static void HandleKeyEvent(int32 code, int8 *buffer);
|
||||
|
||||
//! Returns the index of the workspaces to which it belongs
|
||||
int32 GetWorkspaceIndex(void) { return _workspace_index; }
|
||||
Workspace *GetWorkspace(void);
|
||||
void SetWorkspace(Workspace *wkspc);
|
||||
int32 GetWorkspaceIndex(void) { return _workspace_index; }
|
||||
Workspace* GetWorkspace(void);
|
||||
void SetWorkspace(Workspace *wkspc);
|
||||
|
||||
//! Returns the window's title
|
||||
const char *Title(void) { return _title->String(); }
|
||||
const char* Title(void) { return _title->String(); }
|
||||
|
||||
Layer* FindLayer(const Layer* start, int32 token) const;
|
||||
void SendMessageToClient( const BMessage* msg ) const;
|
||||
Layer* FindLayer(const Layer* start, int32 token) const;
|
||||
void SendMessageToClient( const BMessage* msg ) const;
|
||||
|
||||
protected:
|
||||
friend class ServerApp;
|
||||
friend class WinBorder;
|
||||
friend class Screen;
|
||||
friend class Layer;
|
||||
|
||||
BString *_title;
|
||||
int32 _look, _feel, _flags;
|
||||
uint32 _workspace_index;
|
||||
Workspace *_workspace;
|
||||
bool _active;
|
||||
BString *_title;
|
||||
int32 _look,
|
||||
_feel,
|
||||
_flags;
|
||||
uint32 _workspace_index;
|
||||
Workspace *_workspace;
|
||||
bool _active;
|
||||
|
||||
ServerApp *_app;
|
||||
WinBorder *_winborder;
|
||||
ServerApp *_app;
|
||||
WinBorder *_winborder;
|
||||
|
||||
thread_id _monitorthread;
|
||||
port_id _receiver; // Messages from window
|
||||
port_id _sender; // Messages to window
|
||||
PortLink *_winlink,*_applink;
|
||||
BLocker _locker;
|
||||
BRect _frame;
|
||||
uint32 _token;
|
||||
int32 _handlertoken;
|
||||
thread_id _monitorthread;
|
||||
port_id _receiver; // Messages from window
|
||||
port_id _sender; // Messages to window
|
||||
PortLink *_winlink,
|
||||
*_applink;
|
||||
BLocker _locker;
|
||||
BRect _frame;
|
||||
uint32 _token;
|
||||
int32 _handlertoken;
|
||||
|
||||
// ADI:
|
||||
BSession* ses;
|
||||
port_id winLooperPort;
|
||||
Layer* top_layer;
|
||||
Layer* cl; // short for currentLayer. We'll use it a lot, that's why it's short :-)
|
||||
BSession *ses;
|
||||
port_id winLooperPort;
|
||||
Layer *top_layer;
|
||||
Layer *cl; // short for currentLayer. We'll use it a lot, that's why it's short :-)
|
||||
};
|
||||
|
||||
void ActivateWindow(ServerWindow *oldwin,ServerWindow *newwin);
|
||||
|
Loading…
x
Reference in New Issue
Block a user