代码拉取完成,页面将自动刷新
From 6c84e1a3246333a384672564e4324ed968b1624e Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 21 Aug 2024 16:44:32 +0800
Subject: [PATCH] Xi: allocate enough XkbActions for our buttons.
---
Xi/exevents.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index e161714..abb8cfc 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -612,6 +612,12 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
}
if (from->button->xkb_acts) {
+ if (!to->button->xkb_acts) {
+ to->button->xkb_acts = calloc(1, sizeof(XkbAction));
+ if (!to->button->xkb_acts)
+ FatalError("[Xi] not enough memory for xkb_acts.\n");
+ }
+
size_t maxbuttons = max(to->button->numButtons, from->button->numButtons);
to->button->xkb_acts = xnfreallocarray(to->button->xkb_acts,
maxbuttons,
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。