We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b46a26c commit 753057dCopy full SHA for 753057d
1 file changed
desktop/src/cef/input/state.rs
@@ -149,7 +149,9 @@ impl ClickTracker {
149
ElementState::Released => (record.up_count, record.up_position),
150
};
151
152
- let within_dist = position.x.abs_diff(prev_position.x) <= MULTICLICK_ALLOWED_TRAVEL && position.y.abs_diff(prev_position.y) <= MULTICLICK_ALLOWED_TRAVEL;
+ let dx = position.x.abs_diff(prev_position.x);
153
+ let dy = position.y.abs_diff(prev_position.y);
154
+ let within_dist = dx <= MULTICLICK_ALLOWED_TRAVEL && dy <= MULTICLICK_ALLOWED_TRAVEL;
155
156
let count = match (prev_count, within_time, within_dist) {
157
(ClickCount::Single, true, true) => ClickCount::Double,
0 commit comments