core: layout: store keysym availability
This commit is contained in:
parent
adf71ed2c8
commit
c152dc8468
2 changed files with 42 additions and 5 deletions
|
|
@ -204,6 +204,12 @@ impl<D: Display, K: Keyboard> Button<D, K> {
|
|||
&self.modifiers
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn update_keys_supported(&mut self)
|
||||
{
|
||||
self.layout.update_keys_supported(&self.kbd)
|
||||
}
|
||||
|
||||
pub fn next_time(&self) -> Option<Instant>
|
||||
{
|
||||
let id = *self.timers.front()?;
|
||||
|
|
@ -229,7 +235,7 @@ impl<D: Display, K: Keyboard> Button<D, K> {
|
|||
}
|
||||
|
||||
if old == ModState::Released || new == ModState::Released {
|
||||
self.layout.update_modifiers(&self.modifiers);
|
||||
self.layout.update_modifiers(&self.kbd, &self.modifiers);
|
||||
if Layout::is_keysym_modifier(modifier) {
|
||||
self.kbd.change_layout(&self.layout);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue