diff --git a/src/apps/terminal/TermParse.cpp b/src/apps/terminal/TermParse.cpp index 131ae022fd..0c7de3324b 100644 --- a/src/apps/terminal/TermParse.cpp +++ b/src/apps/terminal/TermParse.cpp @@ -149,8 +149,11 @@ TermParse::PtyReader() uchar buf[READ_BUF_SIZE]; int nread = read(fFd, buf, READ_BUF_SIZE - (read_p - fBufferPosition)); if (nread <= 0) { - fView->NotifyQuit(errno); - exit_thread(errno); + fView->NotifyQuit(errno); + // on the next iteration, fQuitting will probably be true, + // or the semaphore acquisition will fail, so this thread will + // be killed anyway. + continue; } // Copy read string to PtyBuffer. diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index 0e34f3fa2f..3ff7dc2337 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -213,8 +213,11 @@ TermView::TermView(BMessage *archive) if (archive->FindInt32("rows", (int32 *)&fTermRows) < B_OK) fTermRows = 25; - // TODO: Retrieve command, colors, history size, etc. from archive - _InitObject(NULL); + const char *command = NULL; + archive->FindString("command", &command); + + // TODO: Retrieve colors, history size, etc. from archive + _InitObject(command); } @@ -1882,6 +1885,11 @@ TermView::_WritePTY(const uchar *text, int numBytes) void TermView::MouseDown(BPoint where) { + // TODO: Get rid of the extra thread for mouse tracking, + // and implement it using something like BTextView uses. + if (!IsFocus()) + MakeFocus(); + int32 buttons; Window()->CurrentMessage()->FindInt32("buttons", &buttons);