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:
shatty
2003-08-10 09:14:33 +00:00
parent 1ede0ee1df
commit be7f06513d
3 changed files with 9 additions and 8 deletions
+1 -2
View File
@@ -66,8 +66,7 @@ TerminalApp::MessageReceived(BMessage *message)
void
TerminalApp::OpenTerminal(BMessage * message)
{
BPoint windowPoint(7,26);
TerminalWindow * terminal = new TerminalWindow(windowPoint,message);
TerminalWindow * terminal = new TerminalWindow(message);
fWindowOpened = true;
}
+7 -5
View File
@@ -24,13 +24,15 @@
#include <debugger.h>
int id = 1;
BRect terminalWindowBounds(0,0,560,390);
TerminalWindow::TerminalWindow(BPoint topLeft, BMessage * settings)
: BWindow(BRect(topLeft,topLeft+BPoint(560,390)),
"terminal",B_DOCUMENT_WINDOW,0)
TerminalWindow::TerminalWindow(BMessage * settings)
: BWindow(terminalWindowBounds.OffsetBySelf(7,26),
"Terminal",B_DOCUMENT_WINDOW,0)
{
fInitStatus = B_ERROR;
int id = 1;
fInitStatus = InitWindow(id++);
Show();
}
@@ -349,7 +351,7 @@ TerminalWindow::SwitchTerminals(BMessage * message)
return;
}
do {
index = (index-1)%teams.CountItems();
index = (index+teams.CountItems()-1)%teams.CountItems();
team_id next = (team_id)teams.ItemAt(index);
result = be_roster->ActivateApp(next);
} while (result != B_OK);
+1 -1
View File
@@ -16,7 +16,7 @@ class TerminalWindow
: public BWindow
{
public:
TerminalWindow(BPoint topLeft, BMessage * settings = 0);
TerminalWindow(BMessage * settings = 0);
virtual ~TerminalWindow();
virtual void Quit(void);