diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-16 12:34:27 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-16 12:34:27 +0800 |
| commit | d07849ff3ef4cfd8ee59eb7a01bdcb6173e788f0 (patch) | |
| tree | a0f4b738917e4176e8eb23fbfb678ebd8dd1b5fb | |
| parent | d0dde689e9462a2ae5708c4e881c4b4ec29643ac (diff) | |
Call setFocusWidget to replace focusOut
| -rw-r--r-- | client/qt4/ibus-input-context.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/qt4/ibus-input-context.cpp b/client/qt4/ibus-input-context.cpp index c5e85c7..102a241 100644 --- a/client/qt4/ibus-input-context.cpp +++ b/client/qt4/ibus-input-context.cpp @@ -88,9 +88,9 @@ IBusInputContext::reset() void IBusInputContext::update () { - QWidget *widget; + QWidget *widget = focusWidget (); - if ((widget = focusWidget ()) == NULL) + if (widget == NULL) return; QRect rect = widget->inputMethodQuery(Qt::ImMicroFocus).toRect (); @@ -147,11 +147,11 @@ IBusInputContext::setFocusWidget (QWidget *widget) void IBusInputContext::widgetDestroyed (QWidget *widget) { - if (has_focus) { - client->focusOut (this); - has_focus = false; - } QInputContext::widgetDestroyed (widget); + + if (has_focus) + setFocusWidget (NULL); + update (); } |
