cargo fmt

This commit is contained in:
Victoria Brekenfeld 2022-07-04 16:00:29 +02:00
parent 43062c1754
commit 39de286d51
40 changed files with 1557 additions and 1080 deletions

View file

@ -1,16 +1,13 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::{
utils::prelude::*,
shell::layout::Orientation,
};
use crate::{shell::layout::Orientation, utils::prelude::*};
use atomic_float::AtomicF64;
use smithay::{
reexports::wayland_server::{
DisplayHandle,
},
reexports::wayland_server::DisplayHandle,
utils::{Logical, Size},
wayland::seat::{AxisFrame, PointerGrab, PointerGrabStartData, PointerInnerHandle, MotionEvent, ButtonEvent},
wayland::seat::{
AxisFrame, ButtonEvent, MotionEvent, PointerGrab, PointerGrabStartData, PointerInnerHandle,
},
};
use std::sync::{atomic::Ordering, Arc};
@ -26,9 +23,9 @@ impl PointerGrab<State> for ResizeForkGrab {
fn motion(
&mut self,
_data: &mut State,
_dh: &DisplayHandle,
handle: &mut PointerInnerHandle<'_, State>,
event: &MotionEvent
_dh: &DisplayHandle,
handle: &mut PointerInnerHandle<'_, State>,
event: &MotionEvent,
) {
// While the grab is active, no client has pointer focus
handle.motion(event.location, None, event.serial, event.time);
@ -58,7 +55,8 @@ impl PointerGrab<State> for ResizeForkGrab {
}
}
fn axis(&mut self,
fn axis(
&mut self,
_data: &mut State,
_dh: &DisplayHandle,
handle: &mut PointerInnerHandle<'_, State>,

View file

@ -1,10 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::{
shell::{
layout::Orientation,
focus::FocusDirection,
},
shell::{focus::FocusDirection, layout::Orientation},
utils::prelude::*,
};
@ -187,7 +184,12 @@ impl TilingLayout {
if let Some(root_id) = tree.root_node_id() {
for node in tree.traverse_pre_order(root_id).unwrap() {
if let Data::Window(window) = node.data() {
self.map_window_internal(space, window, None, Option::<std::iter::Empty<&Window>>::None);
self.map_window_internal(
space,
window,
None,
Option::<std::iter::Empty<&Window>>::None,
);
}
}
}
@ -274,7 +276,7 @@ impl TilingLayout {
}
}
}
fn active_tree<'a>(trees: &'a mut Vec<Tree<Data>>, output: usize) -> &'a mut Tree<Data> {
while trees.len() <= output {
trees.push(Tree::new())
@ -558,11 +560,8 @@ impl TilingLayout {
if let Some(geo) = geo {
#[allow(irrefutable_let_patterns)]
if let Kind::Xdg(xdg) = &window.toplevel() {
if xdg
.current_state()
.states.contains(XdgState::Fullscreen)
|| xdg
.with_pending_state(|pending| {
if xdg.current_state().states.contains(XdgState::Fullscreen)
|| xdg.with_pending_state(|pending| {
pending.states.contains(XdgState::Fullscreen)
})
{