chore: clippy
This commit is contained in:
parent
c13e52da04
commit
2ca99c670a
59 changed files with 1974 additions and 2137 deletions
|
|
@ -862,43 +862,43 @@ impl Drop for MoveGrab {
|
|||
window_location.to_local(&workspace.output),
|
||||
);
|
||||
|
||||
if matches!(previous, ManagedLayer::Floating) {
|
||||
if let Some(sz) = grab_state.snapping_zone {
|
||||
if sz == SnappingZone::Maximize {
|
||||
shell.maximize_toggle(
|
||||
&window,
|
||||
&seat,
|
||||
&state.common.event_loop_handle,
|
||||
);
|
||||
} else {
|
||||
let directions = match sz {
|
||||
SnappingZone::Maximize => vec![],
|
||||
SnappingZone::Top => vec![Direction::Up],
|
||||
SnappingZone::TopLeft => {
|
||||
vec![Direction::Up, Direction::Left]
|
||||
}
|
||||
SnappingZone::Left => vec![Direction::Left],
|
||||
SnappingZone::BottomLeft => {
|
||||
vec![Direction::Down, Direction::Left]
|
||||
}
|
||||
SnappingZone::Bottom => vec![Direction::Down],
|
||||
SnappingZone::BottomRight => {
|
||||
vec![Direction::Down, Direction::Right]
|
||||
}
|
||||
SnappingZone::Right => vec![Direction::Right],
|
||||
SnappingZone::TopRight => {
|
||||
vec![Direction::Up, Direction::Right]
|
||||
}
|
||||
};
|
||||
for direction in directions {
|
||||
workspace.floating_layer.move_element(
|
||||
direction,
|
||||
&seat,
|
||||
ManagedLayer::Floating,
|
||||
&theme,
|
||||
&window,
|
||||
);
|
||||
if matches!(previous, ManagedLayer::Floating)
|
||||
&& let Some(sz) = grab_state.snapping_zone
|
||||
{
|
||||
if sz == SnappingZone::Maximize {
|
||||
shell.maximize_toggle(
|
||||
&window,
|
||||
&seat,
|
||||
&state.common.event_loop_handle,
|
||||
);
|
||||
} else {
|
||||
let directions = match sz {
|
||||
SnappingZone::Maximize => vec![],
|
||||
SnappingZone::Top => vec![Direction::Up],
|
||||
SnappingZone::TopLeft => {
|
||||
vec![Direction::Up, Direction::Left]
|
||||
}
|
||||
SnappingZone::Left => vec![Direction::Left],
|
||||
SnappingZone::BottomLeft => {
|
||||
vec![Direction::Down, Direction::Left]
|
||||
}
|
||||
SnappingZone::Bottom => vec![Direction::Down],
|
||||
SnappingZone::BottomRight => {
|
||||
vec![Direction::Down, Direction::Right]
|
||||
}
|
||||
SnappingZone::Right => vec![Direction::Right],
|
||||
SnappingZone::TopRight => {
|
||||
vec![Direction::Up, Direction::Right]
|
||||
}
|
||||
};
|
||||
for direction in directions {
|
||||
workspace.floating_layer.move_element(
|
||||
direction,
|
||||
&seat,
|
||||
ManagedLayer::Floating,
|
||||
&theme,
|
||||
&window,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue