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/707>
This commit is contained in:
@ -1186,7 +1186,7 @@ mod seat {
|
|||||||
key_id,
|
key_id,
|
||||||
modifier, time,
|
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
|
// only show when UI is present
|
||||||
|
|||||||
@ -228,10 +228,11 @@ impl Submission {
|
|||||||
|
|
||||||
pub fn handle_drop_modifier(
|
pub fn handle_drop_modifier(
|
||||||
&mut self,
|
&mut self,
|
||||||
key_id: KeyStateId,
|
_key_id: KeyStateId,
|
||||||
|
modifier: Modifier,
|
||||||
_time: Timestamp,
|
_time: Timestamp,
|
||||||
) {
|
) {
|
||||||
vec_remove(&mut self.modifiers_active, |(id, _)| *id == key_id);
|
vec_remove(&mut self.modifiers_active, |(_, m)| *m == modifier);
|
||||||
self.update_modifiers();
|
self.update_modifiers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user