cargo fmt
This commit is contained in:
parent
5e9ea93819
commit
b6c5d00bec
17 changed files with 264 additions and 277 deletions
|
|
@ -804,11 +804,15 @@ impl PointerTarget<State> for CosmicWindow {
|
|||
}
|
||||
|
||||
fn axis(&self, seat: &Seat<State>, data: &mut State, frame: AxisFrame) {
|
||||
if let Some(Focus::Header) = self.0.with_program(|p| p.current_focus()) { PointerTarget::axis(&self.0, seat, data, frame) }
|
||||
if let Some(Focus::Header) = self.0.with_program(|p| p.current_focus()) {
|
||||
PointerTarget::axis(&self.0, seat, data, frame)
|
||||
}
|
||||
}
|
||||
|
||||
fn frame(&self, seat: &Seat<State>, data: &mut State) {
|
||||
if let Some(Focus::Header) = self.0.with_program(|p| p.current_focus()) { PointerTarget::frame(&self.0, seat, data) }
|
||||
if let Some(Focus::Header) = self.0.with_program(|p| p.current_focus()) {
|
||||
PointerTarget::frame(&self.0, seat, data)
|
||||
}
|
||||
}
|
||||
|
||||
fn leave(&self, seat: &Seat<State>, data: &mut State, serial: Serial, time: u32) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ fn next_workspace(
|
|||
shell
|
||||
.workspaces
|
||||
.spaces_for_output(&output)
|
||||
.skip_while(|space| space.handle != current_handle).nth(1)
|
||||
.skip_while(|space| space.handle != current_handle)
|
||||
.nth(1)
|
||||
.map(|space| (current_handle, space.handle))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -962,45 +962,35 @@ impl MenuAlignment {
|
|||
AxisAlignment::Centered,
|
||||
)
|
||||
.into_iter()
|
||||
.chain(
|
||||
for_alignment(
|
||||
position,
|
||||
size,
|
||||
AxisAlignment::Centered,
|
||||
AxisAlignment::Corner(0),
|
||||
),
|
||||
)
|
||||
.chain(
|
||||
for_alignment(
|
||||
position,
|
||||
size,
|
||||
AxisAlignment::Corner(0),
|
||||
AxisAlignment::Centered,
|
||||
),
|
||||
)
|
||||
.chain(
|
||||
for_alignment(
|
||||
position,
|
||||
size,
|
||||
AxisAlignment::Corner(0),
|
||||
AxisAlignment::Corner(0),
|
||||
),
|
||||
)
|
||||
.chain(for_alignment(
|
||||
position,
|
||||
size,
|
||||
AxisAlignment::Centered,
|
||||
AxisAlignment::Corner(0),
|
||||
))
|
||||
.chain(for_alignment(
|
||||
position,
|
||||
size,
|
||||
AxisAlignment::Corner(0),
|
||||
AxisAlignment::Centered,
|
||||
))
|
||||
.chain(for_alignment(
|
||||
position,
|
||||
size,
|
||||
AxisAlignment::Corner(0),
|
||||
AxisAlignment::Corner(0),
|
||||
))
|
||||
.collect(),
|
||||
(AxisAlignment::PreferCentered, y) => {
|
||||
for_alignment(position, size, AxisAlignment::Centered, y)
|
||||
.into_iter()
|
||||
.chain(
|
||||
for_alignment(position, size, AxisAlignment::Corner(0), y),
|
||||
)
|
||||
.chain(for_alignment(position, size, AxisAlignment::Corner(0), y))
|
||||
.collect()
|
||||
}
|
||||
(x, AxisAlignment::PreferCentered) => {
|
||||
for_alignment(position, size, x, AxisAlignment::Centered)
|
||||
.into_iter()
|
||||
.chain(
|
||||
for_alignment(position, size, x, AxisAlignment::Corner(0)),
|
||||
)
|
||||
.chain(for_alignment(position, size, x, AxisAlignment::Corner(0)))
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ impl MoveGrabState {
|
|||
if output
|
||||
.geometry()
|
||||
.as_logical()
|
||||
.intersection(window_geo).is_none()
|
||||
.intersection(window_geo)
|
||||
.is_none()
|
||||
{
|
||||
return Vec::new();
|
||||
}
|
||||
|
|
@ -113,8 +114,8 @@ impl MoveGrabState {
|
|||
.corner_radius(window_geo.size, self.indicator_thickness);
|
||||
|
||||
let focus_element = if self.indicator_thickness > 0 {
|
||||
Some(
|
||||
CosmicMappedRenderElement::from(IndicatorShader::focus_element(
|
||||
Some(CosmicMappedRenderElement::from(
|
||||
IndicatorShader::focus_element(
|
||||
renderer,
|
||||
Key::Window(Usage::MoveGrabIndicator, self.window.key()),
|
||||
Rectangle::new(
|
||||
|
|
@ -135,8 +136,8 @@ impl MoveGrabState {
|
|||
active_window_hint.green,
|
||||
active_window_hint.blue,
|
||||
],
|
||||
)),
|
||||
)
|
||||
),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
@ -435,8 +436,7 @@ impl MoveGrab {
|
|||
}
|
||||
}
|
||||
|
||||
let indicator_location =
|
||||
shell.stacking_indicator(¤t_output, self.previous);
|
||||
let indicator_location = shell.stacking_indicator(¤t_output, self.previous);
|
||||
if indicator_location.is_some() != grab_state.stacking_indicator.is_some() {
|
||||
grab_state.stacking_indicator = indicator_location.map(|geo| {
|
||||
let element = stack_hover(
|
||||
|
|
|
|||
|
|
@ -535,7 +535,9 @@ impl TouchGrab<State> for ResizeForkGrab {
|
|||
event: &TouchMotionEvent,
|
||||
seq: Serial,
|
||||
) {
|
||||
if event.slot == <Self as TouchGrab<State>>::start_data(self).slot && self.update_location(data, event.location, false) {
|
||||
if event.slot == <Self as TouchGrab<State>>::start_data(self).slot
|
||||
&& self.update_location(data, event.location, false)
|
||||
{
|
||||
handle.unset_grab(self, data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue