diff options
author | Matsuu Takuto <matsuu@gentoo.org> | 2008-11-02 09:31:21 +0000 |
---|---|---|
committer | Matsuu Takuto <matsuu@gentoo.org> | 2008-11-02 09:31:21 +0000 |
commit | 5b5514e8705207076efb06101fa3018d5413aca9 (patch) | |
tree | 03ebf8c6d77878057c02030dc11e44187ad3fada /app-i18n/scim-bridge | |
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')
-rw-r--r-- | app-i18n/scim-bridge/ChangeLog | 8 | ||||
-rw-r--r-- | app-i18n/scim-bridge/files/scim-bridge-0.4.15-qt4-focus.patch | 59 | ||||
-rw-r--r-- | app-i18n/scim-bridge/scim-bridge-0.4.15-r3.ebuild | 92 |
3 files changed, 158 insertions, 1 deletions
diff --git a/app-i18n/scim-bridge/ChangeLog b/app-i18n/scim-bridge/ChangeLog index d451a85c541b..84e7c02cb12b 100644 --- a/app-i18n/scim-bridge/ChangeLog +++ b/app-i18n/scim-bridge/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-i18n/scim-bridge # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-i18n/scim-bridge/ChangeLog,v 1.22 2008/10/18 16:54:10 matsuu Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-i18n/scim-bridge/ChangeLog,v 1.23 2008/11/02 09:31:21 matsuu Exp $ + +*scim-bridge-0.4.15-r3 (02 Nov 2008) + + 02 Nov 2008; MATSUU Takuto <matsuu@gentoo.org> + +files/scim-bridge-0.4.15-qt4-focus.patch, +scim-bridge-0.4.15-r3.ebuild: + Fixed Qt4 focus issue, bug #242848. *scim-bridge-0.4.15-r2 (18 Oct 2008) 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 + diff --git a/app-i18n/scim-bridge/scim-bridge-0.4.15-r3.ebuild b/app-i18n/scim-bridge/scim-bridge-0.4.15-r3.ebuild new file mode 100644 index 000000000000..5e10ca95efc0 --- /dev/null +++ b/app-i18n/scim-bridge/scim-bridge-0.4.15-r3.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-i18n/scim-bridge/scim-bridge-0.4.15-r3.ebuild,v 1.1 2008/11/02 09:31:21 matsuu Exp $ + +EAPI="1" +WANT_AUTOMAKE="latest" +WANT_AUTOCONF="latest" + +inherit autotools eutils qt3 + +DESCRIPTION="Yet another IM-client of SCIM" +HOMEPAGE="http://www.scim-im.org/projects/scim_bridge" +SRC_URI="mirror://sourceforge/scim/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc64 ~sparc ~x86" +IUSE="doc gtk qt3 qt4" + +RESTRICT="test" + +RDEPEND=">=app-i18n/scim-1.4.6 + gtk? ( + >=x11-libs/gtk+-2.2 + >=x11-libs/pango-1.1 + ) + qt3? ( + x11-libs/qt:3 + >=x11-libs/pango-1.1 + ) + qt4? ( + || ( ( x11-libs/qt-gui:4 x11-libs/qt-core:4 ) + =x11-libs/qt-4.3*:4 ) + >=x11-libs/pango-1.1 + )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + dev-util/intltool + doc? ( app-doc/doxygen )" + +get_gtk_confdir() { + if use amd64 || ( [ "${CONF_LIBDIR}" == "lib32" ] && use x86 ) ; then + echo "/etc/gtk-2.0/${CHOST}" + else + echo "/etc/gtk-2.0" + fi +} + +pkg_setup() { + if use qt3 && ! built_with_use =x11-libs/qt-3* immqt-bc && ! built_with_use =x11-libs/qt-3* immqt; then + die "You need to rebuild >=x11-libs/qt-3.3.4 with immqt-bc(recommended) or immqt USE flag enabled." + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${PN}-0.4.14-qt4.patch" + # bug #242848 + epatch "${FILESDIR}/${P}-qt4-focus.patch" + # bug #241954 + intltoolize --force + eautoreconf +} + +src_compile() { + econf \ + $(use_enable gtk gtk2-immodule) \ + $(use_enable qt3 qt3-immodule) \ + $(use_enable qt4 qt4-immodule) \ + $(use_enable doc documents) || die + emake || die +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + dodoc AUTHORS ChangeLog NEWS README +} + +pkg_postinst() { + elog + elog "If you would like to use ${PN} as default instead of scim, set" + elog " $ export GTK_IM_MODULE=scim-bridge" + elog " $ export QT_IM_MODULE=scim-bridge" + elog + [ -x /usr/bin/gtk-query-immodules-2.0 ] && gtk-query-immodules-2.0 > "${ROOT}$(get_gtk_confdir)/gtk.immodules" +} + +pkg_postrm() { + [ -x /usr/bin/gtk-query-immodules-2.0 ] && gtk-query-immodules-2.0 > "${ROOT}$(get_gtk_confdir)/gtk.immodules" +} |