diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-12-14 21:07:08 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-04-25 07:00:09 +0000 |
commit | 23453c30084d09d7325e113bbc3d0637c51cb3e7 (patch) | |
tree | 6fe61eaeb57f0b6c928325af433439113fded158 /src/compositor/extensions/qwaylandtextinput.cpp | |
parent | 88c47136d57edc45bddd0bec4ce7953b191f4a42 (diff) |
drop qwaylandxkb and share the logic with X11
QtWayland can benefit from sharing code with X11.
This will fix issues that have been reported and fixed on XCB
a long time ago.
Task-number: QTBUG-65503
Fixes: QTBUG-71301
Fixes: QTBUG-66497
Change-Id: I09cbf8e1c9cf29e8d7f46b97bc2f11d6e91b61a5
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/compositor/extensions/qwaylandtextinput.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandtextinput.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/compositor/extensions/qwaylandtextinput.cpp b/src/compositor/extensions/qwaylandtextinput.cpp index 6cf33d18d..f60a32a14 100644 --- a/src/compositor/extensions/qwaylandtextinput.cpp +++ b/src/compositor/extensions/qwaylandtextinput.cpp @@ -45,12 +45,15 @@ #include "qwaylandsurface.h" #include "qwaylandview.h" -#include "qwaylandxkb_p.h" #include "qwaylandinputmethodeventbuilder_p.h" #include <QGuiApplication> #include <QInputMethodEvent> +#if QT_CONFIG(xkbcommon) +#include <QtXkbCommonSupport/private/qxkbcommon_p.h> +#endif + QT_BEGIN_NAMESPACE QWaylandTextInputClientState::QWaylandTextInputClientState() @@ -203,11 +206,15 @@ void QWaylandTextInputPrivate::sendKeyEvent(QKeyEvent *event) // TODO add support for modifiers - foreach (xkb_keysym_t keysym, QWaylandXkb::toKeysym(event)) { +#if QT_CONFIG(xkbcommon) + for (xkb_keysym_t keysym : QXkbCommon::toKeysym(event)) { send_keysym(focusResource->handle, event->timestamp(), keysym, event->type() == QEvent::KeyPress ? WL_KEYBOARD_KEY_STATE_PRESSED : WL_KEYBOARD_KEY_STATE_RELEASED, 0); } +#else + Q_UNUSED(event); +#endif } void QWaylandTextInputPrivate::sendInputPanelState() |