chore: clippy
This commit is contained in:
parent
3b70bc0265
commit
0847247c33
77 changed files with 865 additions and 1029 deletions
|
|
@ -36,12 +36,11 @@ impl PreferredDecorationMode {
|
|||
pub fn mode(window: &Window) -> Option<XdgMode> {
|
||||
let user_data = window.user_data();
|
||||
user_data.insert_if_missing(|| PreferredDecorationMode(RefCell::new(None)));
|
||||
user_data
|
||||
*user_data
|
||||
.get::<PreferredDecorationMode>()
|
||||
.unwrap()
|
||||
.0
|
||||
.borrow()
|
||||
.clone()
|
||||
}
|
||||
|
||||
pub fn update(window: &Window, update: Option<XdgMode>) {
|
||||
|
|
@ -56,21 +55,12 @@ impl PreferredDecorationMode {
|
|||
}
|
||||
|
||||
pub type KdeDecorationData = Mutex<KdeDecorationSurfaceState>;
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Default)]
|
||||
pub struct KdeDecorationSurfaceState {
|
||||
pub mode: Option<KdeMode>,
|
||||
pub objs: Vec<OrgKdeKwinServerDecoration>,
|
||||
}
|
||||
|
||||
impl Default for KdeDecorationSurfaceState {
|
||||
fn default() -> Self {
|
||||
KdeDecorationSurfaceState {
|
||||
mode: None,
|
||||
objs: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl XdgDecorationHandler for State {
|
||||
fn new_decoration(&mut self, toplevel: ToplevelSurface) {
|
||||
let shell = self.common.shell.read();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue