summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt5/qtwayland/0001-fix-build-without-xkbcommon-evdev.patch
blob: 04ae7e0e8701f7fca4f97d45ebd7254a108fc897 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From e41bc392aa79073926aba917796e836f5b0d9f32 Mon Sep 17 00:00:00 2001
From: Raphael Freudiger <laser_b@gmx.ch>
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 <laser_b@gmx.ch>
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
---
 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 dc9000d..4eebfd6 100644
--- a/src/compositor/compositor.pro
+++ b/src/compositor/compositor.pro
@@ -32,3 +32,5 @@ include ($$PWD/extensions/extensions.pri)
 MODULE_PLUGIN_TYPES = \
     wayland-graphics-integration-server
 load(qt_module)
+
+LIBS += -lxkbcommon
diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp
index c30f7b1..e6f1a0b 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard.cpp
+++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp
@@ -349,12 +349,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()
 {
@@ -384,6 +378,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()) {