diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-02-04 22:00:35 +0200 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-02-05 07:42:11 +0000 |
commit | 7fec8a70acf8359d650a89b2eaf207b3a8b25540 (patch) | |
tree | 5a4a40083c59ae4f61bb429d45c32ffd0cc3b8ed | |
parent | af3cc691951b5ba84111aff204e65bf258848f3d (diff) | |
download | qtwayland-7fec8a70acf8359d650a89b2eaf207b3a8b25540.tar.gz |
Do not send invisible key characters
xkb_keysym_to_utf32() will return 0 if the keysym does not have a
unicode representation.
Task-number: QTBUG-44012
Change-Id: I85a13b58c7f0b9765c7d67db6568a90629bcfbfa
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 30bc6029..b2dfd757 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -778,7 +778,8 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, Qt::KeyboardModifiers modifiers = mParent->modifiers(); uint utf32 = xkb_keysym_to_utf32(sym); - text = QString::fromUcs4(&utf32, 1); + if (utf32) + text = QString::fromUcs4(&utf32, 1); qtkey = keysymToQtKey(sym, modifiers, text); |