diff options
author | 2008-11-02 09:31:21 +0000 | |
---|---|---|
committer | 2008-11-02 09:31:21 +0000 | |
commit | 5b5514e8705207076efb06101fa3018d5413aca9 (patch) | |
tree | 03ebf8c6d77878057c02030dc11e44187ad3fada /app-i18n/scim-bridge/files | |
parent | Version bumped. (diff) | |
download | gentoo-2-5b5514e8705207076efb06101fa3018d5413aca9.tar.gz gentoo-2-5b5514e8705207076efb06101fa3018d5413aca9.tar.bz2 gentoo-2-5b5514e8705207076efb06101fa3018d5413aca9.zip |
Fixed Qt4 focus issue, bug #242848.
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-gentoo x86_64)
Diffstat (limited to 'app-i18n/scim-bridge/files')
-rw-r--r-- | app-i18n/scim-bridge/files/scim-bridge-0.4.15-qt4-focus.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/app-i18n/scim-bridge/files/scim-bridge-0.4.15-qt4-focus.patch b/app-i18n/scim-bridge/files/scim-bridge-0.4.15-qt4-focus.patch new file mode 100644 index 000000000000..75f91f28ab93 --- /dev/null +++ b/app-i18n/scim-bridge/files/scim-bridge-0.4.15-qt4-focus.patch @@ -0,0 +1,59 @@ +From 94a089901574835c4f96e322a129c24bc73b76e6 Mon Sep 17 00:00:00 2001 +From: Alexander Gavrilov <angavrilov@gmail.com> +Date: Sun, 7 Sep 2008 00:41:08 +0400 +Subject: [PATCH] Trying to fix KDE BUG#167982 + +The bug is caused by preedit string update events that were sent by +scim-bridge during the focus change sequence. Problems: + +1) QInputContext::setFocusWidget() is called before focus_out() +2) Preedit string hide event is sent even if it wasn't displayed. + +As a result, when the focus is switched in, the _target_ Kate widget +receives a preedit event, and trashes its selection. + +This patch is an obvious stopgap measure that seems unlikely to cause +regression, but requires attention of people with better understanding +of the affected interfaces. + +Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> +--- + client-qt/qt4/scim-bridge-client-imcontext-qt.cpp | 13 +++++++++++++ + 1 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/client-qt/qt4/scim-bridge-client-imcontext-qt.cpp b/client-qt/qt4/scim-bridge-client-imcontext-qt.cpp +index f65ad02..fbdb327 100644 +--- a/client-qt/qt4/scim-bridge-client-imcontext-qt.cpp ++++ b/client-qt/qt4/scim-bridge-client-imcontext-qt.cpp +@@ -219,6 +219,12 @@ void ScimBridgeClientIMContextImpl::widgetDestroyed (QWidget *widget) + void ScimBridgeClientIMContextImpl::setFocusWidget (QWidget *widget) + { + scim_bridge_pdebugln (4, "ScimBridgeClientIMContextImpl::setFocusWidget ()"); ++ ++ if (focused_imcontext != NULL) { ++ focused_imcontext->focus_out (); ++ focused_imcontext = NULL; ++ } ++ + QInputContext::setFocusWidget (widget); + focus_in (); + update (); +@@ -442,8 +448,15 @@ void ScimBridgeClientIMContextImpl::focus_out () + } + } + ++#ifdef QT4 ++ if (preedit_shown) { ++ set_preedit_shown (false); ++ update_preedit (); ++ } ++#else + set_preedit_shown (false); + update_preedit (); ++#endif + + focused_imcontext = NULL; + } +-- +1.6.0.20.g6148bc + |