From 45a30dac4ad39be03fd8405db688f9e59f9d2a53 Mon Sep 17 00:00:00 2001 From: xingxing Date: Mon, 11 Apr 2022 17:16:34 +0800 Subject: [PATCH] solve which display X11 cannot support keycodes above 255 --- ...arnings-at-the-default-warning-level.patch | 40 +++++++++++++++++++ xorg-x11-xkb-utils.spec | 10 ++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 backport-Suppress-high-keycode-warnings-at-the-default-warning-level.patch diff --git a/backport-Suppress-high-keycode-warnings-at-the-default-warning-level.patch b/backport-Suppress-high-keycode-warnings-at-the-default-warning-level.patch new file mode 100644 index 0000000..ec19079 --- /dev/null +++ b/backport-Suppress-high-keycode-warnings-at-the-default-warning-level.patch @@ -0,0 +1,40 @@ +From 1fdbacbe34742328b2a95742982b6017f60a1342 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Wed, 17 Oct 2018 11:44:37 -0400 +Subject: [PATCH] Suppress high-keycode warnings at the default warning level + +We expect evdev to have keycodes above 255, there's no reason to warn +about this. + +Signed-off-by: Adam Jackson + +Conflict:NA +Reference:https://gitlab.freedesktop.org/xorg/app/xkbcomp/-/commit/1fdbacbe34742328b2a95742982b6017f60a1342 +--- + keycodes.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/keycodes.c b/keycodes.c +index c21f7c4..425ba10 100644 +--- a/keycodes.c ++++ b/keycodes.c +@@ -332,7 +332,7 @@ AddKeyName(KeyNamesInfo * info, + + if ((kc < info->effectiveMin) || (kc > info->effectiveMax)) + { +- if (!high_keycode_warned) ++ if (!high_keycode_warned && warningLevel > 1) + { + WARN2("Unsupported high keycode %d for name <%s> ignored\n", + kc, name); +@@ -596,7 +596,7 @@ HandleKeycodeDef(KeycodeDef * stmt, unsigned merge, KeyNamesInfo * info) + code = result.ival; + if ((code < info->effectiveMin) || (code > info->effectiveMax)) + { +- if (!high_keycode_warned) ++ if (!high_keycode_warned && warningLevel > 1) + { + WARN2("Unsupported high keycode %d for name <%s> ignored\n", + code, stmt->name); +-- +GitLab diff --git a/xorg-x11-xkb-utils.spec b/xorg-x11-xkb-utils.spec index e282015..1df4f38 100644 --- a/xorg-x11-xkb-utils.spec +++ b/xorg-x11-xkb-utils.spec @@ -1,7 +1,7 @@ Summary: X.Org X11 xkb utilities Name: xorg-x11-xkb-utils Version: 7.7 -Release: 28 +Release: 29 License: MIT URL: https://www.x.org @@ -11,6 +11,8 @@ Source2: https://www.x.org/pub/individual/app/xkbevd-1.1.4.tar.bz2 Source3: https://www.x.org/pub/individual/app/xkbprint-1.0.4.tar.bz2 Source4: https://www.x.org/pub/individual/app/xkbutils-1.0.4.tar.bz2 +Patch6000: backport-Suppress-high-keycode-warnings-at-the-default-warning-level.patch + BuildRequires: byacc pkgconfig(x11) pkgconfig(xaw7) pkgconfig(xkbfile) pkgconfig(xorg-macros) >= 1.8 pkgconfig(xt) Provides: setxkbmap = 1.3.1 @@ -88,6 +90,12 @@ X.Org X11 xkb utilities development files. %{_libdir}/pkgconfig/xkbcomp.pc %changelog +* Mon Apr 11 2022 xingxing - 7.7-29 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:solve which display X11 cannot support keycodes above 255 + * Thu Sep 12 2019 openEuler Buildteam - 7.7-28 - Package init -- Gitee