Skip to content

Commit 695c148

Browse files
authored
* Fix Riey#609 * Update CHANGELOG.md
1 parent eb1b260 commit 695c148

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
* Update configuration.md
1010
* Correct scan code to properly recognize F11 and F12 key
11+
* Fix KDE plasmashell crash #609
1112

1213
## 3.0.1
1314

src/frontends/qt5/src/input_context.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "input_context.hpp"
22

33
#include <QMetaEnum>
4-
#include <QtCore/QCoreApplication>
4+
#include <QtGui/QGuiApplication>
55
#include <QtGui/QKeyEvent>
66
#include <QtGui/QTextCharFormat>
77

@@ -90,6 +90,7 @@ bool KimeInputContext::filterEvent(const QEvent *event) {
9090
}
9191

9292
void KimeInputContext::preedit_str(kime::RustStr s) {
93+
this->focus_object = qApp->focusObject();
9394
if (!this->focus_object) {
9495
return;
9596
}
@@ -105,6 +106,7 @@ void KimeInputContext::preedit_str(kime::RustStr s) {
105106
}
106107

107108
void KimeInputContext::commit_str(kime::RustStr s) {
109+
this->focus_object = qApp->focusObject();
108110
if (!this->focus_object) {
109111
return;
110112
}

0 commit comments

Comments
 (0)