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]
22 lines
1.2 KiB
Diff
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
|