author | josef <josef> | 2002-10-20 16:39:25 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-20 16:39:25 (UTC) |
commit | 1f106a8b44ae659f30361588f53354e8f1985974 (patch) (unidiff) | |
tree | 7d5fc441c776ec8ad5313350ea78c3289cca2bc2 | |
parent | d3936c24518e9fea48a060eaef02e64a89646657 (diff) | |
download | opie-1f106a8b44ae659f30361588f53354e8f1985974.zip opie-1f106a8b44ae659f30361588f53354e8f1985974.tar.gz opie-1f106a8b44ae659f30361588f53354e8f1985974.tar.bz2 |
- fix focus handling:
If a new session is created, it gets the focus.
Likewise, if we switch the session.
Before the patch, one had to click inside the term window to be able to type.
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 49f9653..afac542 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -432,12 +432,15 @@ void MainWindow::create( const Profile& prof ) { | |||
432 | 432 | ||
433 | // is io_layer wants direct connection, then autoconnect | 433 | // is io_layer wants direct connection, then autoconnect |
434 | //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { | 434 | //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { |
435 | if (prof.autoConnect()) { | 435 | if (prof.autoConnect()) { |
436 | slotConnect(); | 436 | slotConnect(); |
437 | } | 437 | } |
438 | |||
439 | QWidget *w = currentSession()->widget(); | ||
440 | if(w) w->setFocus(); | ||
438 | } | 441 | } |
439 | 442 | ||
440 | void MainWindow::slotTransfer() | 443 | void MainWindow::slotTransfer() |
441 | { | 444 | { |
442 | if ( currentSession() ) { | 445 | if ( currentSession() ) { |
443 | TransferDialog dlg(currentSession()->widgetStack(), this); | 446 | TransferDialog dlg(currentSession()->widgetStack(), this); |
@@ -476,12 +479,15 @@ void MainWindow::slotSessionChanged( Session* ses ) { | |||
476 | m_connect->setEnabled( false ); | 479 | m_connect->setEnabled( false ); |
477 | m_disconnect->setEnabled( true ); | 480 | m_disconnect->setEnabled( true ); |
478 | } else { | 481 | } else { |
479 | m_connect->setEnabled( true ); | 482 | m_connect->setEnabled( true ); |
480 | m_disconnect->setEnabled( false ); | 483 | m_disconnect->setEnabled( false ); |
481 | } | 484 | } |
485 | |||
486 | QWidget *w = m_curSession->widget(); | ||
487 | if(w) w->setFocus(); | ||
482 | } | 488 | } |
483 | } | 489 | } |
484 | 490 | ||
485 | void MainWindow::slotFullscreen() { | 491 | void MainWindow::slotFullscreen() { |
486 | 492 | ||
487 | 493 | ||