From ca13ad2d1a5c119fb3f45c805d2f3caaede95a7d Mon Sep 17 00:00:00 2001 From: Raphael Freudiger Date: Tue, 10 Jan 2017 15:49:55 +0100 Subject: [PATCH] fix build without xkbcommon-evdev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4f52c4ad741fdd7063a18b67f5777b52f03726fe Signed-off-by: Raphael Freudiger Signed-off-by: Gordan Markuš --- src/client/client.pro | 2 ++ src/compositor/compositor.pro | 2 ++ src/compositor/compositor_api/qwaylandkeyboard.cpp | 13 +++++++------ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/client/client.pro b/src/client/client.pro index eae7ad5..0bb7b18 100644 --- a/src/client/client.pro +++ b/src/client/client.pro @@ -147,3 +147,5 @@ MODULE_PLUGIN_TYPES = \ wayland-decoration-client \ wayland-shell-integration load(qt_module) + +LIBS += -lxkbcommon diff --git a/src/compositor/compositor.pro b/src/compositor/compositor.pro index 47be591..805c81e 100644 --- a/src/compositor/compositor.pro +++ b/src/compositor/compositor.pro @@ -34,3 +34,5 @@ MODULE_PLUGIN_TYPES = \ wayland-hardware-layer-integration \ load(qt_module) + +LIBS += -lxkbcommon diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp index 7ab8bff..8c36774 100644 --- a/src/compositor/compositor_api/qwaylandkeyboard.cpp +++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp @@ -334,12 +334,6 @@ void QWaylandKeyboardPrivate::createXKBState(xkb_keymap *keymap) xkb_state = xkb_state_new(keymap); } -uint QWaylandKeyboardPrivate::toWaylandXkbV1Key(const uint nativeScanCode) -{ - const uint offset = 8; - Q_ASSERT(nativeScanCode >= offset); - return nativeScanCode - offset; -} void QWaylandKeyboardPrivate::createXKBKeymap() { @@ -369,6 +363,13 @@ void QWaylandKeyboardPrivate::createXKBKeymap() } #endif +uint QWaylandKeyboardPrivate::toWaylandXkbV1Key(const uint nativeScanCode) +{ + const uint offset = 8; + Q_ASSERT(nativeScanCode >= offset); + return nativeScanCode - offset; +} + void QWaylandKeyboardPrivate::sendRepeatInfo() { Q_FOREACH (Resource *resource, resourceMap()) {