input: Make it possible to deactivate a modifier with any button for it
Before this change, one could only deactivate a modifier with the same button that was used to activate it. Pressing another button for the same modifier did not work. Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/706>
This commit is contained in:
@ -1186,7 +1186,7 @@ mod seat {
|
||||
key_id,
|
||||
modifier, time,
|
||||
),
|
||||
false => submission.handle_drop_modifier(key_id, time),
|
||||
false => submission.handle_drop_modifier(key_id, modifier, time),
|
||||
}
|
||||
}
|
||||
// only show when UI is present
|
||||
|
||||
@ -229,10 +229,11 @@ impl Submission {
|
||||
|
||||
pub fn handle_drop_modifier(
|
||||
&mut self,
|
||||
key_id: KeyStateId,
|
||||
_key_id: KeyStateId,
|
||||
modifier: Modifier,
|
||||
_time: Timestamp,
|
||||
) {
|
||||
vec_remove(&mut self.modifiers_active, |(id, _)| *id == key_id);
|
||||
vec_remove(&mut self.modifiers_active, |(_, m)| *m == modifier);
|
||||
self.update_modifiers();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user