Skip to content

Conversation

@ids1024
Copy link
Member

@ids1024 ids1024 commented May 21, 2025

This fixes excessive keymap events with virtual-keyboard-unstable-v1 clients like fcitx5.

This depends on sha2. Adding a new dependency for this is annoying, but this is a fairly widely used crate. blake3 could also work but is less widely used. Perhaps a dependency couple be avoided if SipHasher is good enough, but as I understand it's not really meant to guarantee an absence of collisions (but may be good enough in practice here?).

I expect computing a hash won't impact performance much, compared to clients having to process excessive keymap events

This fixes excessive keymap events with `virtual-keyboard-unstable-v1`
clients like fcitx5.

This depends on `sha2`. Adding a new dependency for this is annoying,
but this is a fairly widely used crate. `blake3` could also work but is
less widely used. Perhaps a dependency couple be avoided if `SipHasher`
is good enough, but as I understand it's not really meant to guarantee
an absence of collisions (but may be good enough in practice here?).

I expect computing a hash won't impact performance much, compared to
clients having to process excessive `keymap` events
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 16.51%. Comparing base (2cf66ca) to head (3f6ff83).
Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
src/input/keyboard/keymap_file.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1740      +/-   ##
==========================================
- Coverage   19.17%   16.51%   -2.67%     
==========================================
  Files         175      175              
  Lines       28562    26968    -1594     
==========================================
- Hits         5478     4454    -1024     
+ Misses      23084    22514     -570     
Flag Coverage Δ
wlcs-buffer ?
wlcs-core 16.10% <83.33%> (-0.37%) ⬇️
wlcs-output 6.66% <83.33%> (-0.18%) ⬇️
wlcs-pointer-input ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me. 👍

@Drakulix Drakulix merged commit a23bfe8 into Smithay:master May 22, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants