diff --git a/backport-makekeys-handle-the-new-EVDEVK-xorgproto-symbols.patch b/backport-makekeys-handle-the-new-EVDEVK-xorgproto-symbols.patch new file mode 100644 index 0000000000000000000000000000000000000000..b541a11e6cc72f51c6edc73aa1d728163eb7268b --- /dev/null +++ b/backport-makekeys-handle-the-new-EVDEVK-xorgproto-symbols.patch @@ -0,0 +1,46 @@ +From e92efc63acd7b377faa9e534f4bf52aaa86be2a9 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 27 Jul 2021 11:46:19 +1000 +Subject: [PATCH] makekeys: handle the new _EVDEVK xorgproto symbols + +These keys are all defined through a macro in the form: + #define XF86XK_BrightnessAuto _EVDEVK(0x0F4) + +The _EVDEVK macro is simply an offset of 0x10081000. +Let's parse these lines correctly so those keysyms end up in our +hashtables. + +Signed-off-by: Peter Hutterer + +Conflict:NA +Reference:https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/e92efc63acd7b377faa9e534f4bf52aaa86be2a9 +--- + src/util/makekeys.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/util/makekeys.c b/src/util/makekeys.c +index e847ef4c..4896cc53 100644 +--- a/src/util/makekeys.c ++++ b/src/util/makekeys.c +@@ -78,6 +78,18 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix) + return 1; + } + ++ /* See if we can parse one of the _EVDEVK symbols */ ++ i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val); ++ if (i == 2 && (tmp = strstr(key, "XK_"))) { ++ memcpy(prefix, key, (size_t)(tmp - key)); ++ prefix[tmp - key] = '\0'; ++ tmp += 3; ++ memmove(key, tmp, strlen(tmp) + 1); ++ ++ *val += 0x10081000; ++ return 1; ++ } ++ + /* Now try to catch alias (XK_foo XK_bar) definitions, and resolve them + * immediately: if the target is in the form XF86XK_foo, we need to + * canonicalise this to XF86foo before we do the lookup. */ +-- +GitLab + diff --git a/libX11.spec b/libX11.spec index 35c756890f49ddb756132eb157f8ae8ef5661450..a0c2cac12b6f8d72e1fa62afdc9ee178a70de0c8 100644 --- a/libX11.spec +++ b/libX11.spec @@ -1,12 +1,13 @@ Name: libX11 Version: 1.7.2 -Release: 2 +Release: 3 Summary: Core X11 protocol client library License: MIT URL: http://www.x.org Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2 Patch1: dont-forward-keycode-0.patch +Patch2: backport-makekeys-handle-the-new-EVDEVK-xorgproto-symbols.patch BuildRequires: xorg-x11-util-macros >= 1.11 xorg-x11-proto-devel perl-Pod-Usage libXau-devel BuildRequires: libxcb-devel >= 1.2 libXdmcp-devel xorg-x11-xtrans-devel >= 1.0.3-4 @@ -73,6 +74,9 @@ make %{?_smp_mflags} check %{_mandir}/*/* %changelog +* Tue Jun 21 2022 wangkerong - 1.7.2-3 +- fix error from unkown X86FMacroxx keysym + * Wed Dec 15 2021 wangkerong - 1.7.2-2 - provide XKBgeom header file