summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2017-03-13 13:50:39 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2017-03-13 13:51:33 +0100
commitdfcda81c5b13ad15517a37bcc45f3bf5f550466c (patch)
treef765a484186ad629aea0c3dbba94e4097a5b68aa /src/compositor
parente2805ef5438117b7828fef33876049c4c00868d2 (diff)
parent3d8b3113c2349b5e002ece39ff20118b471aac6e (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor_api/qwaylandkeyboard.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp
index 55381b450..986f819ff 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard.cpp
+++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp
@@ -175,7 +175,11 @@ void QWaylandKeyboardPrivate::keyboard_release(wl_keyboard::Resource *resource)
void QWaylandKeyboardPrivate::keyEvent(uint code, uint32_t state)
{
+#if QT_CONFIG(xkbcommon_evdev)
uint key = toWaylandXkbV1Key(code);
+#else
+ uint key = code;
+#endif
if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
keys << key;
} else {
@@ -187,7 +191,11 @@ void QWaylandKeyboardPrivate::sendKeyEvent(uint code, uint32_t state)
{
uint32_t time = compositor()->currentTimeMsecs();
uint32_t serial = compositor()->nextSerial();
+#if QT_CONFIG(xkbcommon_evdev)
uint key = toWaylandXkbV1Key(code);
+#else
+ uint key = code;
+#endif
if (focusResource)
send_key(focusResource->handle, serial, time, key, state);
}