diff options
-rw-r--r-- | meta/recipes-graphics/xorg-lib/libx11/keysym.patch | 46 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-lib/libx11/keysym.patch b/meta/recipes-graphics/xorg-lib/libx11/keysym.patch new file mode 100644 index 0000000000..f4d7419c02 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libx11/keysym.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/79] | ||
2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
3 | |||
4 | From e92efc63acd7b377faa9e534f4bf52aaa86be2a9 Mon Sep 17 00:00:00 2001 | ||
5 | From: Peter Hutterer <peter.hutterer@who-t.net> | ||
6 | Date: Tue, 27 Jul 2021 11:46:19 +1000 | ||
7 | Subject: [PATCH] makekeys: handle the new _EVDEVK xorgproto symbols | ||
8 | |||
9 | These keys are all defined through a macro in the form: | ||
10 | #define XF86XK_BrightnessAuto _EVDEVK(0x0F4) | ||
11 | |||
12 | The _EVDEVK macro is simply an offset of 0x10081000. | ||
13 | Let's parse these lines correctly so those keysyms end up in our | ||
14 | hashtables. | ||
15 | |||
16 | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> | ||
17 | --- | ||
18 | src/util/makekeys.c | 12 ++++++++++++ | ||
19 | 1 file changed, 12 insertions(+) | ||
20 | |||
21 | diff --git a/src/util/makekeys.c b/src/util/makekeys.c | ||
22 | index e847ef4c..4896cc53 100644 | ||
23 | --- a/src/util/makekeys.c | ||
24 | +++ b/src/util/makekeys.c | ||
25 | @@ -78,6 +78,18 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix) | ||
26 | return 1; | ||
27 | } | ||
28 | |||
29 | + /* See if we can parse one of the _EVDEVK symbols */ | ||
30 | + i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val); | ||
31 | + if (i == 2 && (tmp = strstr(key, "XK_"))) { | ||
32 | + memcpy(prefix, key, (size_t)(tmp - key)); | ||
33 | + prefix[tmp - key] = '\0'; | ||
34 | + tmp += 3; | ||
35 | + memmove(key, tmp, strlen(tmp) + 1); | ||
36 | + | ||
37 | + *val += 0x10081000; | ||
38 | + return 1; | ||
39 | + } | ||
40 | + | ||
41 | /* Now try to catch alias (XK_foo XK_bar) definitions, and resolve them | ||
42 | * immediately: if the target is in the form XF86XK_foo, we need to | ||
43 | * canonicalise this to XF86foo before we do the lookup. */ | ||
44 | -- | ||
45 | GitLab | ||
46 | |||
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb b/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb index 5d7e9e3783..c9ddc12f08 100644 --- a/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb +++ b/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb | |||
@@ -12,6 +12,7 @@ PE = "1" | |||
12 | 12 | ||
13 | SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \ | 13 | SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \ |
14 | file://disable_tests.patch \ | 14 | file://disable_tests.patch \ |
15 | file://keysym.patch \ | ||
15 | " | 16 | " |
16 | 17 | ||
17 | SRC_URI[sha256sum] = "1cfa35e37aaabbe4792e9bb690468efefbfbf6b147d9c69d6f90d13c3092ea6c" | 18 | SRC_URI[sha256sum] = "1cfa35e37aaabbe4792e9bb690468efefbfbf6b147d9c69d6f90d13c3092ea6c" |