FocusOut widget when widgetDestroyed.
authorHuang Peng <shawn.p.huang@gmail.com>
Tue, 16 Sep 2008 01:51:04 +0000 (09:51 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Tue, 16 Sep 2008 01:51:04 +0000 (09:51 +0800)
client/qt4/ibus-input-context.cpp

index ec71e6e..c5e85c7 100644 (file)
@@ -147,6 +147,10 @@ IBusInputContext::setFocusWidget (QWidget *widget)
 void
 IBusInputContext::widgetDestroyed (QWidget *widget)
 {
+       if (has_focus) {
+               client->focusOut (this);
+               has_focus = false;
+       }
        QInputContext::widgetDestroyed (widget);
        update ();
 }