[packages/caribou] Rel 3; switch to python3; disable apidocs (no valadoc-1.0); patches from debian

arekm arekm at pld-linux.org
Sun Aug 24 21:37:25 CEST 2025


commit 4912285d691bfd97f16dfff724e44e665ea5c686
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Aug 24 21:37:18 2025 +0200

    Rel 3; switch to python3; disable apidocs (no valadoc-1.0); patches from debian

 Fix-compilation-error.patch                        |  24 +++++
 ...popmenu-not-showing-after-being-dismissed.patch |  31 ++++++
 autostart-set-nodisplay.patch                      |  21 ++++
 build.patch                                        |  70 +++++++++++++
 caribou.spec                                       |  43 +++++---
 fix-font-property-in-style.css.patch               |  26 +++++
 stop-patching-generated-gir.patch                  | 116 +++++++++++++++++++++
 xadapter.vala-Remove-XkbKeyTypesMask-and-f.patch   |  46 ++++++++
 8 files changed, 363 insertions(+), 14 deletions(-)
---
diff --git a/caribou.spec b/caribou.spec
index cbf287e..07c48ee 100644
--- a/caribou.spec
+++ b/caribou.spec
@@ -1,17 +1,24 @@
 #
 # Conditional build:
-%bcond_without	apidocs		# Valadoc documentation
+%bcond_with	apidocs		# Valadoc documentation
 
 Summary:	On-screen keyboard
 Summary(pl.UTF-8):	Klawiatura ekranowa
 Name:		caribou
 Version:	0.4.21
-Release:	2
+Release:	3
 License:	LGPL v2+
 Group:		X11/Applications/Accessibility
 Source0:	https://download.gnome.org/sources/caribou/0.4/%{name}-%{version}.tar.xz
 # Source0-md5:	16b76cd7453b99e2871e8d4da88bf976
 Patch0:		%{name}-docs.patch
+Patch1:		autostart-set-nodisplay.patch
+Patch2:		fix-font-property-in-style.css.patch
+Patch3:		Fix-compilation-error.patch
+Patch4:		Fix-subkey-popmenu-not-showing-after-being-dismissed.patch
+Patch5:		xadapter.vala-Remove-XkbKeyTypesMask-and-f.patch
+Patch6:		stop-patching-generated-gir.patch
+Patch7:		build.patch
 URL:		https://wiki.gnome.org/Projects/Caribou
 BuildRequires:	at-spi2-core-devel >= 2
 BuildRequires:	autoconf >= 2.63
@@ -27,8 +34,8 @@ BuildRequires:	libgee-devel >= 0.8
 BuildRequires:	libxklavier-devel
 BuildRequires:	libxml2-devel
 BuildRequires:	pkgconfig
-BuildRequires:	python >= 1:2.4
-BuildRequires:	python-pygobject3-devel >= 3.0.0
+BuildRequires:	python3 >= 1:2.4
+BuildRequires:	python3-pygobject3-devel >= 3.0.0
 BuildRequires:	rpmbuild(macros) >= 1.752
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	vala >= 2:0.14.0
@@ -42,7 +49,7 @@ Requires(post,postun):	glib2 >= 1:2.30.0
 Requires:	clutter >= 1.6.0
 Requires:	glib2 >= 1:2.30.0
 Requires:	gobject-introspection >= 0.10.7
-Requires:	python-caribou = %{version}-%{release}
+Requires:	python3-caribou = %{version}-%{release}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -96,19 +103,19 @@ API documentation for Caribou library.
 %description apidocs -l pl.UTF-8
 Dokumentacja API biblioteki Caribou.
 
-%package -n python-caribou
+%package -n python3-caribou
 Summary:	Keyboard UI for Caribou
 Summary(pl.UTF-8):	Interfejs użytkownika klawiatury dla Caribou
 Group:		Development/Languages/Python
 Requires:	%{name}-libs = %{version}-%{release}
-Requires:	python-modules >= 1:2.4
-Requires:	python-pyatspi >= 2.2.0
-Requires:	python-pygobject3 >= 3.0.0
+Requires:	python3-modules >= 1:2.4
+Requires:	python3-pyatspi >= 2.2.0
+Requires:	python3-pygobject3 >= 3.0.0
 
-%description -n python-caribou
+%description -n python3-caribou
 This package contains Caribou Python GUI.
 
-%description -n python-caribou -l pl.UTF-8
+%description -n python3-caribou -l pl.UTF-8
 Ten pakiet zawiera graficzny interfejs użytkownika Caribou w Pythonie.
 
 %package -n vala-caribou
@@ -157,7 +164,7 @@ Summary:	Keyboard implementation for Caribou
 Summary(pl.UTF-8):	Implementacja klawiatury dla Caribou
 Group:		X11/Applications
 Requires:	%{name} = %{version}-%{release}
-Requires:	python-caribou = %{version}-%{release}
+Requires:	python3-caribou = %{version}-%{release}
 
 %description antler
 This package contains Caribou keyboard implementation.
@@ -168,6 +175,13 @@ Ten pakiet zawiera implementację klawiatury Caribou.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
+%patch -P6 -p1
+%patch -P7 -p1
 
 %build
 %{__libtoolize}
@@ -175,6 +189,7 @@ Ten pakiet zawiera implementację klawiatury Caribou.
 %{__autoconf}
 %{__automake}
 %configure \
+	PYTHON="%{__python3}" \
 	%{?with_apidocs:--enable-docs} \
 	--disable-silent-rules \
 	--disable-static
@@ -239,9 +254,9 @@ fi
 %{_datadir}/devhelp/references/caribou
 %endif
 
-%files -n python-caribou
+%files -n python3-caribou
 %defattr(644,root,root,755)
-%{py_sitescriptdir}/caribou
+%{py3_sitescriptdir}/caribou
 
 %files -n vala-caribou
 %defattr(644,root,root,755)
diff --git a/Fix-compilation-error.patch b/Fix-compilation-error.patch
new file mode 100644
index 0000000..a42a290
--- /dev/null
+++ b/Fix-compilation-error.patch
@@ -0,0 +1,24 @@
+From bc6f3e7ca0921b50a3ff836d08ce264a4f114224 Mon Sep 17 00:00:00 2001
+From: Clement Lefebvre <clement.lefebvre at linuxmint.com>
+Date: Tue, 12 Jan 2021 17:29:16 +0000
+Subject: [PATCH 1/4] Fix compilation error
+
+---
+ libcaribou/key-model.vala | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcaribou/key-model.vala b/libcaribou/key-model.vala
+index 89015bc..e88342e 100644
+--- a/libcaribou/key-model.vala
++++ b/libcaribou/key-model.vala
+@@ -101,7 +101,7 @@ namespace Caribou {
+                     unichar uc;
+                     while (text.get_next_char (ref index, out uc)) {
+                         uint keyval = Gdk.unicode_to_keyval (uc);
+-                        if (keyval != uc | 0x01000000)
++                        if (keyval != (uc | 0x01000000))
+                             _keyvals += keyval;
+                     }
+                 } else {
+-- 
+2.29.2
diff --git a/Fix-subkey-popmenu-not-showing-after-being-dismissed.patch b/Fix-subkey-popmenu-not-showing-after-being-dismissed.patch
new file mode 100644
index 0000000..e85a14c
--- /dev/null
+++ b/Fix-subkey-popmenu-not-showing-after-being-dismissed.patch
@@ -0,0 +1,31 @@
+From 85ac8f9e210243d95163cf8b1013470a6d9c7eaa Mon Sep 17 00:00:00 2001
+From: Clement Lefebvre <clement.lefebvre at linuxmint.com>
+Date: Tue, 12 Jan 2021 17:30:25 +0000
+Subject: [PATCH 2/4] Fix subkey popmenu not showing after being dismissed
+
+To reproduce the issue:
+
+- long-press the "e" button
+- don't select any sub button.. just select "e" again to close the menu
+
+After this the menu no long appears when long-pressing "e".
+
+This commit fixes that.
+---
+ libcaribou/key-model.vala | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libcaribou/key-model.vala b/libcaribou/key-model.vala
+index e88342e..2f640f2 100644
+--- a/libcaribou/key-model.vala
++++ b/libcaribou/key-model.vala
+@@ -179,6 +179,7 @@ namespace Caribou {
+                 hold_tid = GLib.Timeout.add (1000, on_key_held);
+ 
+             key_pressed(this);
++            show_subkeys = false;
+         }
+ 
+         public void release () {
+-- 
+2.29.2
diff --git a/autostart-set-nodisplay.patch b/autostart-set-nodisplay.patch
new file mode 100644
index 0000000..10087f3
--- /dev/null
+++ b/autostart-set-nodisplay.patch
@@ -0,0 +1,21 @@
+From 286582f90fbbc9b3baa6b055bba1141cc30e6e94 Mon Sep 17 00:00:00 2001
+From: Jeremy Bicha <jbicha at ubuntu.com>
+Date: Thu, 12 Oct 2017 18:14:35 -0400
+Subject: autostart: Set NoDisplay=true
+
+https://bugzilla.gnome.org/show_bug.cgi?id=788906
+https://launchpad.net/bugs/1723266
+---
+ data/caribou-autostart.desktop.in.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/data/caribou-autostart.desktop.in.in b/data/caribou-autostart.desktop.in.in
+index 4bd1c03..bf73a94 100644
+--- a/data/caribou-autostart.desktop.in.in
++++ b/data/caribou-autostart.desktop.in.in
+@@ -5,4 +5,5 @@ Exec=@libexecdir@/caribou
+ AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-keyboard-enabled
+ X-GNOME-AutoRestart=true
+ #X-GNOME-Autostart-Phase=Initialization
++NoDisplay=true
+ OnlyShowIn=GNOME;Unity;
diff --git a/build.patch b/build.patch
new file mode 100644
index 0000000..7574164
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,70 @@
+--- caribou-0.4.21/libcaribou/keyboard-model.c~	2016-07-20 07:13:28.000000000 +0200
++++ caribou-0.4.21/libcaribou/keyboard-model.c	2025-08-24 20:58:58.846844082 +0200
+@@ -545,7 +545,7 @@ gchar** caribou_keyboard_model_get_group
+ 	gint _tmp7__length1 = 0;
+ 	g_return_val_if_fail (self != NULL, NULL);
+ 	_tmp0_ = self->priv->groups;
+-	_tmp1_ = gee_abstract_map_get_keys ((GeeMap*) _tmp0_);
++	_tmp1_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp0_);
+ 	_tmp2_ = _tmp1_;
+ 	_tmp3_ = _tmp2_;
+ 	_tmp5_ = gee_collection_to_array ((GeeCollection*) _tmp3_, &_tmp4_);
+@@ -636,7 +636,7 @@ static CaribouIKeyboardObject** caribou_
+ 	gint _tmp7__length1 = 0;
+ 	self = (CaribouKeyboardModel*) base;
+ 	_tmp0_ = self->priv->groups;
+-	_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
++	_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
+ 	_tmp2_ = _tmp1_;
+ 	_tmp3_ = _tmp2_;
+ 	_tmp5_ = gee_collection_to_array (_tmp3_, &_tmp4_);
+--- caribou-0.4.21/modules/gtk3/caribou-gtk-module.c~	2016-07-20 07:13:31.000000000 +0200
++++ caribou-0.4.21/modules/gtk3/caribou-gtk-module.c	2025-08-24 21:08:55.453671154 +0200
+@@ -596,8 +596,8 @@ static void caribou_gtk_module_callback
+ 		CaribouKeyboard* _tmp3_ = NULL;
+ 		CaribouKeyboard* _tmp4_ = NULL;
+ 		_tmp1_ = res;
+-		_tmp2_ = g_async_result_get_source_object (_tmp1_);
+-		_tmp3_ = g_async_initable_new_finish (_tmp2_, _tmp1_, &_inner_error_);
++		_tmp2_ = (CaribouKeyboard *)g_async_result_get_source_object (_tmp1_);
++		_tmp3_ = (CaribouKeyboard *)g_async_initable_new_finish ((GAsyncInitable *)_tmp2_, _tmp1_, &_inner_error_);
+ 		g_object_unref (_tmp2_);
+ 		_tmp0_ = (CaribouKeyboard*) _tmp3_;
+ 		if (G_UNLIKELY (_inner_error_ != NULL)) {
+--- caribou-0.4.21/modules/gtk2/caribou-gtk-module.c.org	2025-08-24 21:09:50.287325594 +0200
++++ caribou-0.4.21/modules/gtk2/caribou-gtk-module.c	2025-08-24 21:11:03.307753162 +0200
+@@ -600,8 +600,8 @@ static void caribou_gtk_module_callback
+ 		CaribouKeyboard* _tmp3_ = NULL;
+ 		CaribouKeyboard* _tmp4_ = NULL;
+ 		_tmp1_ = res;
+-		_tmp2_ = g_async_result_get_source_object (_tmp1_);
+-		_tmp3_ = g_async_initable_new_finish (_tmp2_, _tmp1_, &_inner_error_);
++		_tmp2_ = (CaribouKeyboard *)g_async_result_get_source_object (_tmp1_);
++		_tmp3_ = (CaribouKeyboard *)g_async_initable_new_finish ((GAsyncInitable *)_tmp2_, _tmp1_, &_inner_error_);
+ 		g_object_unref (_tmp2_);
+ 		_tmp0_ = (CaribouKeyboard*) _tmp3_;
+ 		if (G_UNLIKELY (_inner_error_ != NULL)) {
+--- caribou-0.4.21/daemon/daemon.c~	2025-08-24 21:24:50.000000000 +0200
++++ caribou-0.4.21/daemon/daemon.c	2025-08-24 21:25:16.292742840 +0200
+@@ -573,7 +573,7 @@ CaribouDaemon* caribou_daemon_construct
+ 	self = (CaribouDaemon*) g_object_new (object_type, NULL);
+ 	_tmp0_ = gdk_display_get_default ();
+ 	self->priv->display = _tmp0_;
+-	_tmp1_ = g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.gnome.Caribou.Daemon", G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT | G_BUS_NAME_OWNER_FLAGS_REPLACE, (GClosure*) ((_caribou_daemon_on_bus_acquired_gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _caribou_daemon_on_bus_acquired_gbus_acquired_callback, g_object_ref (self), g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((_caribou_daemon_quit_gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _caribou_daemon_quit_gbus_name_lost_callback, g_object_ref (self), g_object_unref)));
++	_tmp1_ = g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.gnome.Caribou.Daemon", G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT | G_BUS_NAME_OWNER_FLAGS_REPLACE, (GClosure*) ((_caribou_daemon_on_bus_acquired_gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _caribou_daemon_on_bus_acquired_gbus_acquired_callback, g_object_ref (self), (GClosureNotify)g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((_caribou_daemon_quit_gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _caribou_daemon_quit_gbus_name_lost_callback, g_object_ref (self), (GClosureNotify)g_object_unref)));
+ 	self->priv->name_id = _tmp1_;
+ 	return self;
+ }
+--- caribou-0.4.21/daemon/daemon.c~	2025-08-24 21:26:42.000000000 +0200
++++ caribou-0.4.21/daemon/daemon.c	2025-08-24 21:28:48.167315462 +0200
+@@ -632,8 +632,8 @@ static void caribou_daemon_on_get_proxy_
+ 		Caribou_Keyboard* _tmp3_ = NULL;
+ 		Caribou_Keyboard* _tmp4_ = NULL;
+ 		_tmp1_ = res;
+-		_tmp2_ = g_async_result_get_source_object (_tmp1_);
+-		_tmp3_ = g_async_initable_new_finish (_tmp2_, _tmp1_, &_inner_error_);
++		_tmp2_ = (Caribou_Keyboard *)g_async_result_get_source_object (_tmp1_);
++		_tmp3_ = (Caribou_Keyboard *)g_async_initable_new_finish ((GAsyncInitable *)_tmp2_, _tmp1_, &_inner_error_);
+ 		g_object_unref (_tmp2_);
+ 		_tmp0_ = (Caribou_Keyboard*) _tmp3_;
+ 		if (G_UNLIKELY (_inner_error_ != NULL)) {
diff --git a/fix-font-property-in-style.css.patch b/fix-font-property-in-style.css.patch
new file mode 100644
index 0000000..722fae5
--- /dev/null
+++ b/fix-font-property-in-style.css.patch
@@ -0,0 +1,26 @@
+From 13df8b92ae89c796238e669ee6ef4447a42d6355 Mon Sep 17 00:00:00 2001
+From: Jeremy Bicha <jbicha at ubuntu.com>
+Date: Fri, 1 Dec 2017 12:11:35 -0500
+Subject: style.css: Fix failure to start in GNOME Flashback
+
+The order for 'font' properties matters
+https://developer.gnome.org/gtk3/stable/chap-css-properties.html
+
+https://bugzilla.gnome.org/show_bug.cgi?id=791001
+---
+ data/antler/style.css | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/antler/style.css b/data/antler/style.css
+index 5ab6f71..4d84904 100644
+--- a/data/antler/style.css
++++ b/data/antler/style.css
+@@ -13,7 +13,7 @@
+   border-width: 0px;
+   border-radius: 2px;
+   border-image: url("dark-key-border.svg") 2 2 2 2 repeat stretch;
+-  font: Sans 14px;
++  font: 14px Sans;
+   background-image: -gtk-gradient (linear,
+ 				     left top,
+ 				     left bottom,
diff --git a/stop-patching-generated-gir.patch b/stop-patching-generated-gir.patch
new file mode 100644
index 0000000..5cbd7c7
--- /dev/null
+++ b/stop-patching-generated-gir.patch
@@ -0,0 +1,116 @@
+From c52ce71c49dc8d6109a58d16cc8d491d7bd1d781 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz at ubuntu.com>
+Date: Wed, 20 Jan 2021 22:59:49 +0100
+Subject: [PATCH] Stop patching the generated GIR
+
+---
+ libcaribou/Makefile.am |  8 ++-----
+ tools/Makefile.am      |  1 -
+ tools/fix_gir.py       | 53 ------------------------------------------
+ 3 files changed, 2 insertions(+), 60 deletions(-)
+ delete mode 100755 tools/fix_gir.py
+
+diff --git a/libcaribou/Makefile.am b/libcaribou/Makefile.am
+index 05f2774..0634374 100644
+--- a/libcaribou/Makefile.am
++++ b/libcaribou/Makefile.am
+@@ -7,7 +7,7 @@ libcaribou_la_VALAFLAGS = \
+ 	--pkg xtst --pkg gee-0.8 --pkg gdk-x11-3.0 --pkg libxml-2.0 \
+ 	--pkg libxklavier --pkg external-libs \
+ 	--internal-vapi caribou-internals-1.0.vapi \
+-	--library caribou-1.0 --gir _Caribou-1.0.gir \
++	--library caribou-1.0 --gir Caribou-1.0.gir \
+ 	--symbols libcaribou.symbols \
+ 	$(VALAFLAGS)
+ 
+@@ -63,9 +63,6 @@ gir_DATA = Caribou-1.0.gir
+ typelibdir = $(libdir)/girepository-1.0
+ typelib_DATA = Caribou-1.0.typelib
+ 
+-Caribou-1.0.gir: _Caribou-1.0.gir
+-	$(AM_V_GEN)$(PYTHON) -B $(top_srcdir)/tools/fix_gir.py $< > $@
+-
+ Caribou-1.0.typelib: Caribou-1.0.gir
+ 	@INTROSPECTION_COMPILER@ --shared-library=libcaribou.so.0 -o $@ $^
+ 
+@@ -81,8 +78,7 @@ CLEANFILES = \
+ 	caribou-1.0.vapi \
+ 	caribou-internals-1.0.vapi \
+ 	Caribou-1.0.typelib \
+-	Caribou-1.0.gir \
+-	_Caribou-1.0.gir
++	Caribou-1.0.gir
+ 
+ DISTCLEANFILES = \
+ 	caribou-1.0.pc
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 3a9bcdb..89f753d 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -1,5 +1,4 @@
+ EXTRA_DIST = \
+-	fix_gir.py \
+ 	make_schema.py \
+ 	convert_cldr.py \
+ 	basic.xsl
+diff --git a/tools/fix_gir.py b/tools/fix_gir.py
+deleted file mode 100755
+index 182d108..0000000
+--- a/tools/fix_gir.py
++++ /dev/null
+@@ -1,53 +0,0 @@
+-#!/usr/bin/python
+-
+-from xml.dom import minidom
+-
+-def purge_white_space_and_fix_namespace(node, indent=0):
+-    if getattr(node, "tagName", None) == "namespace":
+-        name = node.getAttribute("name")
+-        node.setAttribute("name", name.lstrip('_'))
+-    for child in [c for c in node.childNodes]:
+-        if child.nodeType == node.TEXT_NODE or \
+-                getattr(child, "tagName", None) == "annotation":
+-            node.removeChild(child)
+-            continue
+-        purge_white_space_and_fix_namespace(child, indent+1)
+-
+-def find_ancestor(node, name):
+-    if getattr(node, "tagName", None) == name:
+-        return node
+-    parent = getattr(node, "parentNode", None)
+-    if not parent:
+-        return None
+-    return find_ancestor(parent, name)
+-
+-def fix_vfuncs(dom):
+-    for f in dom.getElementsByTagName("field"):
+-        callbacks = f.getElementsByTagName("callback")
+-
+-        record = find_ancestor(f, "record")
+-        if not record:
+-            continue
+-
+-        name = record.getAttribute("name")
+-        cname = record.getAttribute("c:type")
+-
+-        assert(name.endswith("Class") or name.endswith("Iface"))
+-        assert(cname.endswith("Class") or name.endswith("Iface"))
+-
+-        if len(callbacks) == 2:
+-            callbacks[-1].parentNode.removeChild(callbacks[-1])
+-
+-if __name__ == "__main__":
+-    import sys
+-
+-    if len(sys.argv) != 2:
+-        print("supply a gir file")
+-        sys.exit(1)
+-
+-    dom = minidom.parse(sys.argv[-1])
+-
+-    purge_white_space_and_fix_namespace(dom)
+-    fix_vfuncs(dom)
+-
+-    print(dom.toprettyxml(indent=" ", newl="\n"))
+-- 
+GitLab
diff --git a/xadapter.vala-Remove-XkbKeyTypesMask-and-f.patch b/xadapter.vala-Remove-XkbKeyTypesMask-and-f.patch
new file mode 100644
index 0000000..bcb2a19
--- /dev/null
+++ b/xadapter.vala-Remove-XkbKeyTypesMask-and-f.patch
@@ -0,0 +1,46 @@
+From 00653c5dcc4be5e983b670d00d5724fc21da2e82 Mon Sep 17 00:00:00 2001
+From: Clement Lefebvre <clement.lefebvre at linuxmint.com>
+Date: Tue, 12 Jan 2021 18:01:47 +0000
+Subject: [PATCH 3/4] [mtwebster] xadapter.vala: Remove XkbKeyTypesMask and
+ fields from XKbChangeMap call.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This was originally a workaround for xFree86 4.3 - see:
+https://bugzilla.gnome.org/show_bug.cgi?id=673547
+​
+As of https://gitlab.freedesktop.org/xorg/xserver/-/commit/87c64fc5b0 this
+causes a BadLength error when attempting to use shifted characters.
+​
+Ref:
+https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#Changing_Map_Components_in_the_Server
+---
+ libcaribou/xadapter.vala | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/libcaribou/xadapter.vala b/libcaribou/xadapter.vala
+index 22858b7..1da5a78 100644
+--- a/libcaribou/xadapter.vala
++++ b/libcaribou/xadapter.vala
+@@ -195,15 +195,10 @@ namespace Caribou {
+ 
+             Xkb.MapChanges changes = Xkb.MapChanges ();
+ 
+-            // We don't touch key types here but include the
+-            // information in XkbSetMap request to the server, because
+-            // some X servers need the information to check the sanity
+-            // of the keysyms change.
+-            changes.changed = (ushort) (Xkb.KeySymsMask | Xkb.KeyTypesMask);
++            changes.changed = (ushort) Xkb.KeySymsMask;
+             changes.first_key_sym = (char) this.reserved_keycode;
+             changes.num_key_syms = this.xkbdesc.map.key_sym_map[this.reserved_keycode].width;
+-            changes.first_type = 0;
+-            changes.num_types = this.xkbdesc.map.num_types;
++
+             Xkb.change_map (this.xdisplay, this.xkbdesc, changes);
+ 
+             this.xdisplay.flush ();
+-- 
+2.29.2
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/caribou.git/commitdiff/4912285d691bfd97f16dfff724e44e665ea5c686



More information about the pld-cvs-commit mailing list