blob: f3e31991b53d22652a5c795c4327d23d63c9e596 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
}
}
|