mirror of
https://github.com/danog/patches.git
synced 2024-12-02 09:17:58 +01:00
2b9afa7592
Backport support for opening directories with xdg desktop portals Backport fix for ibus on wayland
18 lines
862 B
Diff
18 lines
862 B
Diff
diff --git a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp
|
|
index 81a730232c..42bab9aa4b 100644
|
|
--- a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp
|
|
+++ b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp
|
|
@@ -273,6 +273,12 @@ bool QComposeInputContext::checkComposeTable()
|
|
|
|
void QComposeInputContext::commitText(uint character) const
|
|
{
|
|
+ // Patch: Crash fix when not focused widget still receives input events.
|
|
+ if (!m_focusObject) {
|
|
+ qWarning("QComposeInputContext::commitText: m_focusObject == nullptr, cannot commit text");
|
|
+ return;
|
|
+ }
|
|
+
|
|
QInputMethodEvent event;
|
|
event.setCommitString(QChar(character));
|
|
QCoreApplication::sendEvent(m_focusObject, &event);
|