Repository navigation
Conversation
winit reports a Force Touch trackpad's pressure on macOS as
WindowEvent::TouchpadPressure { pressure, stage }; egui-winit only asked
for a repaint and dropped it (TODO(emilk)). It now becomes
egui::Event::TouchpadPressure { pressure, stage: u8 }: a reading that is
not a finite number or a stage outside u8 is dropped, and the pressure is
kept within 0..=1.
Author
|
Note for merging: the E22 row in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
E22 in
PATCHES.md, for storytold/lightcraft#4228.Summary
winit reports a Force Touch trackpad's pressure on macOS. egui-winit asked for a repaint and dropped the reading (
TODO(emilk)), so an app could not see it.LightCraft uses it to keep the tone curve still while a finger comes off the trackpad. The pressure falls (stage 2 → 1, or stage 1 below its recent peak) before or just after the contact point starts to slide. Other platforms send nothing.
Evidence
touchpad_pressure_is_passed_on_within_range: in-range readings pass,stage 0passes, out-of-range pressure is clamped, NaN, ∞ and stages −1 and 256 are dropped.cargo fmt --all --checkandcargo clippy --workspace --all-targets -D warningspass.cargo test -p egui -p egui-winitpasses.cargo check -p eframe --target wasm32-unknown-unknownpasses.Merge Danger
Door: two-way
Blast Radius:
egui::EventmatchesEventis not#[non_exhaustive]. A downstreammatchon it without a wildcard arm stops compiling until it handles the new variant. This workspace has none.