summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 30dd21c..c1020fa 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -476,53 +476,50 @@ void MainWindow::slotOpenButtons( bool state ) {
476 476
477void MainWindow::slotSessionChanged( Session* ses ) { 477void MainWindow::slotSessionChanged( Session* ses ) {
478 qWarning("changed!"); 478 qWarning("changed!");
479 if ( ses ) { 479 if ( ses ) {
480 m_curSession = ses; 480 m_curSession = ses;
481 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); 481 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) );
482 if ( m_curSession->layer()->isConnected() ) { 482 if ( m_curSession->layer()->isConnected() ) {
483 m_connect->setEnabled( false ); 483 m_connect->setEnabled( false );
484 m_disconnect->setEnabled( true ); 484 m_disconnect->setEnabled( true );
485 } else { 485 } else {
486 m_connect->setEnabled( true ); 486 m_connect->setEnabled( true );
487 m_disconnect->setEnabled( false ); 487 m_disconnect->setEnabled( false );
488 } 488 }
489 489
490 QWidget *w = m_curSession->widget(); 490 QWidget *w = m_curSession->widget();
491 if(w) w->setFocus(); 491 if(w) w->setFocus();
492 } 492 }
493} 493}
494 494
495void MainWindow::slotFullscreen() { 495void MainWindow::slotFullscreen() {
496 496
497 497
498 498
499 if ( m_isFullscreen ) { 499 if ( m_isFullscreen ) {
500 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), false ); 500 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true );
501 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 501 ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() );
502
503 setCentralWidget( m_consoleWindow );
504 ( m_curSession->widgetStack() )->show();
505 ( m_curSession->emulationHandler() )->cornerButton()->hide(); 502 ( m_curSession->emulationHandler() )->cornerButton()->hide();
506 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 503 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
507 504
508 } else { 505 } else {
509 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget(); 506 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget();
510 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); 507 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
511 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop 508 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
512 , QPoint(0,0), false ); 509 , QPoint(0,0), false );
513 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() ); 510 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() );
514 ( m_curSession->widgetStack() )->setFocus(); 511 ( m_curSession->widgetStack() )->setFocus();
515 ( m_curSession->widgetStack() )->show(); 512 ( m_curSession->widgetStack() )->show();
516 513
517 ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); 514 ( ( m_curSession->emulationHandler() )->cornerButton() )->show();
518 515
519 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 516 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
520 } 517 }
521 518
522 m_isFullscreen = !m_isFullscreen; 519 m_isFullscreen = !m_isFullscreen;
523} 520}
524 521
525 522
526void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool pressed, bool, ushort, ushort) { 523void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool pressed, bool, ushort, ushort) {
527 524
528 //qWarning("unicode: %x, qkey: %x, %s", u, q, pressed ? "pressed" : "released"); 525 //qWarning("unicode: %x, qkey: %x, %s", u, q, pressed ? "pressed" : "released");