Skip to content

Commit a4cc835

Browse files
wyu71Zeno-sole
authored andcommitted
feat: add patches from master branch for 5.1.9-1deepin1
Add two patches to fix input method issues: - Fix systray menu input method switching - Handle QLineEdit focus with QCompleter 从 master 分支移植两个 patch,修复托盘菜单切换输入法和 QLineEdit 焦点问题。 Log: 移植 master 分支的 patch 到 topic Influence: 修复托盘菜单无法切换输入法和 QLineEdit 配合 QCompleter 的焦点问题。
1 parent ffb45bf commit a4cc835

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

debian/changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
fcitx5-qt (5.1.9-1deepin1) unstable; urgency=medium
2+
3+
* Add patches from master branch:
4+
- 0001-Fix-can-t-switch-input-methods-through-the-systray-m.patch
5+
- 0002-Handle-QLineEdit-focus-object-correctly-with-QCompleter.patch
6+
7+
-- Wang Yu <wangyu@uniontech.com> Wed, 12 Mar 2025 10:50:00 +0800
8+
19
fcitx5-qt (5.1.9-1) unstable; urgency=medium
210

311
* New upstream release.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From: zsien <quezhiyong@deepin.org>
2+
Date: Fri, 15 Mar 2024 09:53:26 +0800
3+
Subject: Fix can't switch input methods through the systray menu
4+
5+
Call focusIn only when input method is accepted,
6+
so that focusIn will not be called when the
7+
systray menu pops up.
8+
---
9+
qt5/platforminputcontext/qfcitxplatforminputcontext.cpp | 4 ++--
10+
1 file changed, 2 insertions(+), 2 deletions(-)
11+
12+
diff --git a/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp b/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp
13+
index b59c13a..caf44e7 100644
14+
--- a/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp
15+
+++ b/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp
16+
@@ -541,7 +541,7 @@ void QFcitxPlatformInputContext::setFocusObject(QObject *object) {
17+
return;
18+
}
19+
20+
- if (proxy) {
21+
+ if (proxy && !shouldDisableInputMethod()) {
22+
proxy->focusIn();
23+
// We need to delegate this otherwise it may cause self-recursion in
24+
// certain application like libreoffice.
25+
@@ -634,7 +634,7 @@ void QFcitxPlatformInputContext::createInputContextFinished(
26+
#else
27+
Q_UNUSED(uuid);
28+
#endif
29+
- if (window && window == w) {
30+
+ if (window && window == w && !shouldDisableInputMethod()) {
31+
cursorRectChanged();
32+
proxy->focusIn();
33+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Index: fcitx5-qt-community/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp
2+
===================================================================
3+
--- fcitx5-qt-community.orig/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp
4+
+++ fcitx5-qt-community/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp
5+
@@ -1249,9 +1249,6 @@ QWindow *QFcitxPlatformInputContext::foc
6+
break;
7+
}
8+
QObject *realFocusObject = focusObjectWrapper();
9+
- if (qGuiApp->focusObject() == realFocusObject) {
10+
- break;
11+
- }
12+
auto *widget = qobject_cast<QWidget *>(realFocusObject);
13+
if (!widget) {
14+
break;

debian/patches/series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
0001-Fix-can-t-switch-input-methods-through-the-systray-m.patch
2+
0002-Handle-QLineEdit-focus-object-correctly-with-QCompleter.patch

0 commit comments

Comments
 (0)