diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2020-11-13 02:00:00 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-11-16 14:51:15 -0500 |
commit | 9252387f1bd980a247dfb0cc4ecb61eb101f0879 (patch) | |
tree | 924bc59e70a6659bfea3f516c4a62b78d1dad49a /app-i18n/fcitx-qt5 | |
parent | app-i18n/fcitx-qt5: Version bump (1.2.5). (diff) | |
download | gentoo-9252387f1bd980a247dfb0cc4ecb61eb101f0879.tar.gz gentoo-9252387f1bd980a247dfb0cc4ecb61eb101f0879.tar.bz2 gentoo-9252387f1bd980a247dfb0cc4ecb61eb101f0879.zip |
app-i18n/fcitx-qt5: Fix potential recursion.
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'app-i18n/fcitx-qt5')
-rw-r--r-- | app-i18n/fcitx-qt5/fcitx-qt5-1.2.5.ebuild | 4 | ||||
-rw-r--r-- | app-i18n/fcitx-qt5/files/fcitx-qt5-1.2.5-QFcitxPlatformInputContext_recursion.patch | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/app-i18n/fcitx-qt5/fcitx-qt5-1.2.5.ebuild b/app-i18n/fcitx-qt5/fcitx-qt5-1.2.5.ebuild index 610eb112d602..729c6f77088a 100644 --- a/app-i18n/fcitx-qt5/fcitx-qt5-1.2.5.ebuild +++ b/app-i18n/fcitx-qt5/fcitx-qt5-1.2.5.ebuild @@ -41,4 +41,8 @@ RDEPEND=">=app-i18n/fcitx-4.2.9:4 DEPEND="${RDEPEND} dev-qt/qtconcurrent:5" +PATCHES=( + "${FILESDIR}/${P}-QFcitxPlatformInputContext_recursion.patch" +) + DOCS=() diff --git a/app-i18n/fcitx-qt5/files/fcitx-qt5-1.2.5-QFcitxPlatformInputContext_recursion.patch b/app-i18n/fcitx-qt5/files/fcitx-qt5-1.2.5-QFcitxPlatformInputContext_recursion.patch new file mode 100644 index 000000000000..f3e31991b53d --- /dev/null +++ b/app-i18n/fcitx-qt5/files/fcitx-qt5-1.2.5-QFcitxPlatformInputContext_recursion.patch @@ -0,0 +1,27 @@ +https://github.com/fcitx/fcitx-qt5/commit/6f2033c497fe0da1fd197bc3be35695b11eafd93 + +--- /platforminputcontext/qfcitxplatforminputcontext.cpp ++++ /platforminputcontext/qfcitxplatforminputcontext.cpp +@@ -291,8 +291,21 @@ + return; + } + if (proxy) { +- cursorRectChanged(); + proxy->focusIn(); ++ // We need to delegate this otherwise it may cause self-recursion in ++ // certain application like libreoffice. ++ auto window = m_lastWindow; ++ QMetaObject::invokeMethod( ++ this, ++ [this, window]() { ++ if (window != m_lastWindow) { ++ return; ++ } ++ if (auto *proxy = validICByWindow(window.data())) { ++ cursorRectChanged(); ++ } ++ }, ++ Qt::QueuedConnection); + } + } + |