fix crash (SIGABRT) on KDE Plasma 6 with KWin 6.7.0: fall back to cursor position when xdg-desktop-portal-kde

returns an internal KWin barrier id instead of the client-provided one (input-capture/src/libei.rs) [release 0.11.0-2mamba;Thu Jun 18 2026]
This commit is contained in:
2026-06-20 00:04:56 +02:00
parent 06873a4a0f
commit 1a3eb0884c
2 changed files with 29 additions and 3 deletions
@@ -0,0 +1,21 @@
--- a/input-capture/src/libei.rs
+++ b/input-capture/src/libei.rs
@@ -413,7 +413,17 @@
};
// find client corresponding to barrier
- let pos = *pos_for_barrier_id.get(&barrier_id).expect("invalid barrier id");
+ // workaround for KDE/KWin returning its own internal barrier ids instead of
+ // the client-provided ones: fall back to cursor position if id is unknown
+ let pos = match pos_for_barrier_id.get(&barrier_id) {
+ Some(&p) => p,
+ None => {
+ log::warn!("unknown barrier_id {barrier_id:?} (compositor returned internal id), falling back to cursor position");
+ let cursor_pos = activated.cursor_position().expect("no cursor position reported by compositor");
+ let fallback_id = find_corresponding_client(&barriers, cursor_pos);
+ *pos_for_barrier_id.get(&fallback_id).expect("fallback barrier id not found")
+ }
+ };
current_pos.replace(Some(pos));
// client entered => send event
+8 -3
View File
@@ -1,7 +1,7 @@
Summary: Software KVM switch for keyboard and mouse sharing over LAN
Name: lan-mouse
Version: 0.11.0
Release: 1mamba
Release: 2mamba
License: GPL-3.0-only
Group: Graphical Desktop/Applications/Networking
Vendor: openmamba
@@ -9,6 +9,7 @@ Distribution: openmamba
Packager: Claude <claude@openmamba.org>
URL: https://github.com/feschber/lan-mouse
Source: https://github.com/feschber/lan-mouse.git/v%{version}/lan-mouse-%{version}.tar.bz2
Patch0: lan-mouse-0.11.0-kde-kwin-barrier-id-fallback.patch
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libX11-devel
@@ -26,7 +27,7 @@ BuildRequires: libei-devel
lan-mouse is a software KVM switch that allows sharing keyboard and mouse between multiple computers over a Local Area Network. It supports Wayland (via wlr-layer-shell protocol and libei/RemoteDesktop portal) and X11.
%prep
%autosetup
%autosetup -p1
%build
export CARGO_HOME=$PWD/.cargo
@@ -51,8 +52,12 @@ install -Dm0644 lan-mouse-gtk/resources/de.feschber.LanMouse.svg \
%doc LICENSE
%changelog
* Thu Jun 18 2026 Claude <claude@openmamba.org> 0.11.0-2mamba
- fix crash (SIGABRT) on KDE Plasma 6 with KWin 6.7.0: fall back to cursor position when xdg-desktop-portal-kde
returns an internal KWin barrier id instead of the client-provided one (input-capture/src/libei.rs)
* Sat Jun 13 2026 Automatic Build System <autodist@openmamba.org> 0.11.0-1mamba
- automatic version update by autodist
* Sun Mar 08 2026 Claude <claude@openmamba.org> 0.10.0-1mamba
- initial package for openmamba
- initial package for openmamba