diff --git a/src/apps/terminal/TerminalApp.cpp b/src/apps/terminal/TerminalApp.cpp index a316b71256..ed51a12a10 100644 --- a/src/apps/terminal/TerminalApp.cpp +++ b/src/apps/terminal/TerminalApp.cpp @@ -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; } diff --git a/src/apps/terminal/TerminalWindow.cpp b/src/apps/terminal/TerminalWindow.cpp index ef7f68617a..e6074c085c 100644 --- a/src/apps/terminal/TerminalWindow.cpp +++ b/src/apps/terminal/TerminalWindow.cpp @@ -24,13 +24,15 @@ #include -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); diff --git a/src/apps/terminal/TerminalWindow.h b/src/apps/terminal/TerminalWindow.h index aa35237b09..6cd9232f3f 100644 --- a/src/apps/terminal/TerminalWindow.h +++ b/src/apps/terminal/TerminalWindow.h @@ -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);