deps: Update smithay

This commit is contained in:
Victoria Brekenfeld 2022-08-31 13:01:23 +02:00
parent 9e0a6e1b5f
commit 6690e13d54
31 changed files with 572 additions and 562 deletions

View file

@ -7,6 +7,7 @@ use crate::{
use serde::{Deserialize, Serialize};
pub use smithay::{
backend::input::KeyState,
input::keyboard::{keysyms as KeySyms, Keysym, ModifiersState},
reexports::{
calloop::LoopHandle,
input::{
@ -15,10 +16,7 @@ pub use smithay::{
},
},
utils::{Logical, Physical, Point, Size, Transform},
wayland::{
output::{Mode, Output},
seat::{keysyms as KeySyms, Keysym, ModifiersState as KeyModifiers},
},
wayland::output::{Mode, Output},
};
use std::{cell::RefCell, collections::HashMap, fs::OpenOptions, path::PathBuf};
@ -696,6 +694,27 @@ pub enum KeyModifier {
NumLock,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct KeyModifiers {
ctrl: bool,
alt: bool,
shift: bool,
logo: bool,
caps_lock: bool,
num_lock: bool,
}
impl PartialEq<ModifiersState> for KeyModifiers {
fn eq(&self, other: &ModifiersState) -> bool {
self.ctrl == other.ctrl
&& self.alt == other.alt
&& self.shift == other.shift
&& self.logo == other.logo
&& self.caps_lock == other.caps_lock
&& self.num_lock == other.num_lock
}
}
impl std::ops::AddAssign<KeyModifier> for KeyModifiers {
fn add_assign(&mut self, rhs: KeyModifier) {
match rhs {

View file

@ -1,18 +1,14 @@
// SPDX-License-Identifier: GPL-3.0-only
#![allow(non_snake_case)]
use super::KeyModifier;
use super::{KeyModifier, KeyModifiers};
use serde::{Deserialize, Serialize};
pub use smithay::{
backend::input::KeyState,
input::keyboard::{keysyms as KeySyms, Keysym, XkbConfig as WlXkbConfig},
reexports::input::{AccelProfile, ClickMethod, ScrollMethod, TapButtonMap},
utils::{Logical, Physical, Point, Size, Transform},
wayland::{
output::{Mode, Output},
seat::{
keysyms as KeySyms, Keysym, ModifiersState as KeyModifiers, XkbConfig as WlXkbConfig,
},
},
wayland::output::{Mode, Output},
};
use xkbcommon::xkb;