summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-01-15 11:51:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-15 12:28:57 +0100
commit3e39883a8a87f99521805ed1feb495bfbcfeef0c (patch)
tree3f01b4ad47bb8f4ec0e69b5d48516fe2eb358789
parentbd772016186fc4860f69f7853137a4fd4e6acdee (diff)
downloadqtwayland-3e39883a8a87f99521805ed1feb495bfbcfeef0c.tar.gz
Fix build without xkbcommon
Change-Id: If6f0c5e14cea659a42dc0ba10c05356a5703ba14 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
-rw-r--r--src/client/qwaylandinputdevice.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index a979baff..46054128 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -736,17 +736,20 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
{
Q_UNUSED(serial);
QWaylandWindow *window = mFocus;
+ uint32_t code = key + 8;
+ bool isDown = state != 0;
+ QEvent::Type type = isDown ? QEvent::KeyPress : QEvent::KeyRelease;
+ QString text;
+ int qtkey = key + 8; // qt-compositor substracts 8 for some reason
+
#ifndef QT_NO_WAYLAND_XKB
if (!mXkbMap)
return;
- uint32_t code = key + 8;
- bool isDown = state != 0;
const xkb_keysym_t *syms;
uint32_t numSyms = xkb_key_get_syms(mXkbState, code, &syms);
xkb_state_update_key(mXkbState, code,
isDown ? XKB_KEY_DOWN : XKB_KEY_UP);
- QEvent::Type type = isDown ? QEvent::KeyPress : QEvent::KeyRelease;
if (!window) {
// We destroyed the keyboard focus surface, but the server
@@ -754,9 +757,6 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
return;
}
- int qtkey = key + 8; // qt-compositor substracts 8 for some reason
- QString text;
-
if (numSyms == 1) {
xkb_keysym_t sym = syms[0];
Qt::KeyboardModifiers modifiers = mParent->modifiers();