summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-11-17 11:03:44 (UTC)
committer mickeyl <mickeyl>2003-11-17 11:03:44 (UTC)
commit725e2723291fe1d71ca68cb59cec83428d40b8af (patch) (side-by-side diff)
tree2c9cb7b26af0c1adea965be4ea458e52ad386a7c
parenta13d188a20f66546d4d96c0c1c06b1f05b69418b (diff)
downloadopie-725e2723291fe1d71ca68cb59cec83428d40b8af.zip
opie-725e2723291fe1d71ca68cb59cec83428d40b8af.tar.gz
opie-725e2723291fe1d71ca68cb59cec83428d40b8af.tar.bz2
hide inputmethod also when not floating
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 62e316c..5d8faf7 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -546,85 +546,85 @@ void InputMethods::showKbd( bool on )
int top = mapToGlobal( QPoint() ).y() - height;
if ( inputWidgetStyle & QWidget::WStyle_DialogBorder )
{
qDebug( "InputMethods: reading geometry." );
Config cfg( "Launcher" );
cfg.setGroup( "InputMethods" );
int l = cfg.readNumEntry( "absX", -1 );
int t = cfg.readNumEntry( "absY", -1 );
int w = cfg.readNumEntry( "absWidth", -1 );
int h = cfg.readNumEntry( "absHeight", -1 );
if ( l > -1 && t > -1 && w > -1 && h > -1 )
{
qDebug( "InputMethods: config values ( %d, %d, %d, %d ) are ok.", l, t, w, h );
left = l;
top = t;
width = w;
height = h;
}
else
{
qDebug( "InputMethods: config values are new or not ok." );
}
}
else
{
qDebug( "InputMethods: no floating selected." );
}
mkeyboard->widget->resize( width, height );
mkeyboard->widget->move( left, top );
mkeyboard->widget->show();
mkeyboard->widget->installEventFilter( this );
}
else
{
if ( inputWidgetStyle & QWidget::WStyle_DialogBorder )
{
QPoint pos = mkeyboard->widget->pos();
QSize siz = mkeyboard->widget->size();
qDebug( "InputMethods: saving geometry." );
Config cfg( "Launcher" );
cfg.setGroup( "InputMethods" );
cfg.writeEntry( "absX", pos.x() );
cfg.writeEntry( "absY", pos.y() );
cfg.writeEntry( "absWidth", siz.width() );
cfg.writeEntry( "absHeight", siz.height() );
cfg.write();
- mkeyboard->widget->hide();
mkeyboard->widget->removeEventFilter( this );
}
+ mkeyboard->widget->hide();
}
emit inputToggled( on );
}
bool InputMethods::shown() const
{
return mkeyboard && mkeyboard->widget->isVisible();
}
QString InputMethods::currentShown() const
{
return mkeyboard && mkeyboard->widget->isVisible()
? mkeyboard->name() : QString::null;
}
void InputMethods::sendKey( ushort unicode, ushort scancode, ushort mod, bool press, bool repeat )
{
#if defined(Q_WS_QWS)
QWSServer::sendKeyEvent( unicode, scancode, mod, press, repeat );
#endif
}
bool InputMethods::eventFilter( QObject* o, QEvent* e )
{
if ( e->type() == QEvent::Close )
{
( (QCloseEvent*) e )->ignore();
showKbd( false );
kbdButton->setOn( false );
return true;
}
return false;
}