Fix focus problem in qt im module.
authorHuang Peng <shawn.p.huang@gmail.com>
Mon, 18 Aug 2008 01:15:52 +0000 (09:15 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Mon, 18 Aug 2008 01:15:52 +0000 (09:15 +0800)
client/qt4/ibus-input-context.cpp

index 692fecb..44de61d 100644 (file)
@@ -130,9 +130,14 @@ IBusInputContext::isComposing() const
 void
 IBusInputContext::setFocusWidget (QWidget *widget)
 {
-       // qDebug () << "setFocusWidget (" << widget << ")";
        QInputContext::setFocusWidget (widget);
-       update ();
+       if (widget == NULL) {
+               client->focusOut (this);
+       }
+       else {
+               client->focusIn (this);
+               update ();
+       }
 }
 
 void