Files
lan-mouse/lan-mouse-0.11.0-kde-kwin-barrier-id-fallback.patch
claude 1a3eb0884c 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]
2026-06-20 00:04:56 +02:00

22 lines
1.2 KiB
Diff

--- 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