fixed swapping windows bug and simplified opening window api in anticipation of smart window locating
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4263 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -66,8 +66,7 @@ TerminalApp::MessageReceived(BMessage *message)
|
|||||||
void
|
void
|
||||||
TerminalApp::OpenTerminal(BMessage * message)
|
TerminalApp::OpenTerminal(BMessage * message)
|
||||||
{
|
{
|
||||||
BPoint windowPoint(7,26);
|
TerminalWindow * terminal = new TerminalWindow(message);
|
||||||
TerminalWindow * terminal = new TerminalWindow(windowPoint,message);
|
|
||||||
fWindowOpened = true;
|
fWindowOpened = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,13 +24,15 @@
|
|||||||
|
|
||||||
#include <debugger.h>
|
#include <debugger.h>
|
||||||
|
|
||||||
int id = 1;
|
BRect terminalWindowBounds(0,0,560,390);
|
||||||
|
|
||||||
TerminalWindow::TerminalWindow(BPoint topLeft, BMessage * settings)
|
TerminalWindow::TerminalWindow(BMessage * settings)
|
||||||
: BWindow(BRect(topLeft,topLeft+BPoint(560,390)),
|
: BWindow(terminalWindowBounds.OffsetBySelf(7,26),
|
||||||
"terminal",B_DOCUMENT_WINDOW,0)
|
"Terminal",B_DOCUMENT_WINDOW,0)
|
||||||
{
|
{
|
||||||
fInitStatus = B_ERROR;
|
fInitStatus = B_ERROR;
|
||||||
|
int id = 1;
|
||||||
|
|
||||||
fInitStatus = InitWindow(id++);
|
fInitStatus = InitWindow(id++);
|
||||||
Show();
|
Show();
|
||||||
}
|
}
|
||||||
@@ -349,7 +351,7 @@ TerminalWindow::SwitchTerminals(BMessage * message)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
index = (index-1)%teams.CountItems();
|
index = (index+teams.CountItems()-1)%teams.CountItems();
|
||||||
team_id next = (team_id)teams.ItemAt(index);
|
team_id next = (team_id)teams.ItemAt(index);
|
||||||
result = be_roster->ActivateApp(next);
|
result = be_roster->ActivateApp(next);
|
||||||
} while (result != B_OK);
|
} while (result != B_OK);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class TerminalWindow
|
|||||||
: public BWindow
|
: public BWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TerminalWindow(BPoint topLeft, BMessage * settings = 0);
|
TerminalWindow(BMessage * settings = 0);
|
||||||
virtual ~TerminalWindow();
|
virtual ~TerminalWindow();
|
||||||
|
|
||||||
virtual void Quit(void);
|
virtual void Quit(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user