aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwayland/0001-fix-build-without-xkbcommon-evdev.patch
blob: e1e978e856f55440f62a8e5b8534ada511222a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From c93dbe53e8a1b2203c750a66c7efe6fc9a326903 Mon Sep 17 00:00:00 2001
From: Raphael Freudiger <raphael.freudiger@siemens.com>
Date: Thu, 22 Dec 2016 13:54:31 +0100
Subject: [PATCH] fix build without xkbcommon-evdev

Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com>
---
 src/compositor/compositor_api/qwaylandkeyboard.cpp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp
index 55381b4..5c054c6 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard.cpp
+++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp
@@ -338,12 +338,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()
 {
@@ -373,6 +367,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()) {
-- 
2.1.4