Fix build without xkbcommon
Change-Id: If6f0c5e14cea659a42dc0ba10c05356a5703ba14 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
parent
003db66339
commit
67f9cef815
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user