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);
|
Q_UNUSED(serial);
|
||||||
QWaylandWindow *window = mFocus;
|
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
|
#ifndef QT_NO_WAYLAND_XKB
|
||||||
if (!mXkbMap)
|
if (!mXkbMap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32_t code = key + 8;
|
|
||||||
bool isDown = state != 0;
|
|
||||||
const xkb_keysym_t *syms;
|
const xkb_keysym_t *syms;
|
||||||
uint32_t numSyms = xkb_key_get_syms(mXkbState, code, &syms);
|
uint32_t numSyms = xkb_key_get_syms(mXkbState, code, &syms);
|
||||||
xkb_state_update_key(mXkbState, code,
|
xkb_state_update_key(mXkbState, code,
|
||||||
isDown ? XKB_KEY_DOWN : XKB_KEY_UP);
|
isDown ? XKB_KEY_DOWN : XKB_KEY_UP);
|
||||||
QEvent::Type type = isDown ? QEvent::KeyPress : QEvent::KeyRelease;
|
|
||||||
|
|
||||||
if (!window) {
|
if (!window) {
|
||||||
// We destroyed the keyboard focus surface, but the server
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qtkey = key + 8; // qt-compositor substracts 8 for some reason
|
|
||||||
QString text;
|
|
||||||
|
|
||||||
if (numSyms == 1) {
|
if (numSyms == 1) {
|
||||||
xkb_keysym_t sym = syms[0];
|
xkb_keysym_t sym = syms[0];
|
||||||
Qt::KeyboardModifiers modifiers = mParent->modifiers();
|
Qt::KeyboardModifiers modifiers = mParent->modifiers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user