chore: format for Rust 2024
This commit is contained in:
parent
0a8da05847
commit
1f7f0c70b7
99 changed files with 414 additions and 442 deletions
|
|
@ -9,21 +9,21 @@ use smithay::{
|
|||
backend::{
|
||||
input::KeyState,
|
||||
renderer::{
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{
|
||||
Element, RenderElement, UnderlyingStorage,
|
||||
memory::MemoryRenderBufferRenderElement,
|
||||
utils::{CropRenderElement, RelocateRenderElement, RescaleRenderElement},
|
||||
Element, RenderElement, UnderlyingStorage,
|
||||
},
|
||||
gles::element::PixelShaderElement,
|
||||
glow::GlowRenderer,
|
||||
utils::{DamageSet, OpaqueRegions},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
},
|
||||
},
|
||||
desktop::{space::SpaceElement, WindowSurfaceType},
|
||||
desktop::{WindowSurfaceType, space::SpaceElement},
|
||||
input::{
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
Seat,
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
},
|
||||
output::Output,
|
||||
reexports::wayland_server::{backend::ObjectId, protocol::wl_surface::WlSurface},
|
||||
|
|
@ -32,7 +32,7 @@ use smithay::{
|
|||
Buffer as BufferCoords, IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size,
|
||||
},
|
||||
wayland::seat::WaylandFocus,
|
||||
xwayland::{xwm::X11Relatable, X11Surface},
|
||||
xwayland::{X11Surface, xwm::X11Relatable},
|
||||
};
|
||||
use stack::CosmicStackInternal;
|
||||
use window::CosmicWindowInternal;
|
||||
|
|
@ -41,7 +41,7 @@ use std::{
|
|||
borrow::Cow,
|
||||
fmt,
|
||||
hash::Hash,
|
||||
sync::{atomic::AtomicBool, Arc, Mutex, Weak},
|
||||
sync::{Arc, Mutex, Weak, atomic::AtomicBool},
|
||||
};
|
||||
|
||||
pub mod surface;
|
||||
|
|
@ -65,12 +65,12 @@ use smithay::desktop::WindowSurface;
|
|||
use tracing::debug;
|
||||
|
||||
use super::{
|
||||
ManagedLayer,
|
||||
focus::target::PointerFocusTarget,
|
||||
layout::{
|
||||
floating::{ResizeState, TiledCorners},
|
||||
tiling::NodeDesc,
|
||||
},
|
||||
ManagedLayer,
|
||||
};
|
||||
use cosmic_settings_config::shortcuts::action::{Direction, FocusDirection};
|
||||
|
||||
|
|
@ -821,10 +821,10 @@ impl CosmicMapped {
|
|||
pub fn key(&self) -> CosmicMappedKey {
|
||||
CosmicMappedKey(match &self.element {
|
||||
CosmicMappedInternal::Stack(stack) => {
|
||||
CosmicMappedKeyInner::Stack(Arc::downgrade(&stack.0 .0))
|
||||
CosmicMappedKeyInner::Stack(Arc::downgrade(&stack.0.0))
|
||||
}
|
||||
CosmicMappedInternal::Window(window) => {
|
||||
CosmicMappedKeyInner::Window(Arc::downgrade(&window.0 .0))
|
||||
CosmicMappedKeyInner::Window(Arc::downgrade(&window.0.0))
|
||||
}
|
||||
_ => unreachable!(),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ use crate::{
|
|||
|
||||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
Apply,
|
||||
iced::{
|
||||
widget::{column, container, horizontal_space, row, vertical_space},
|
||||
Alignment,
|
||||
widget::{column, container, horizontal_space, row, vertical_space},
|
||||
},
|
||||
iced_core::{Background, Border, Color, Length},
|
||||
theme,
|
||||
widget::{icon::from_name, text},
|
||||
Apply,
|
||||
};
|
||||
use cosmic_settings_config::shortcuts::action::{Action, ResizeDirection};
|
||||
use smithay::utils::Size;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use super::{
|
||||
window::{Focus, RESIZE_BORDER},
|
||||
CosmicSurface,
|
||||
window::{Focus, RESIZE_BORDER},
|
||||
};
|
||||
use crate::{
|
||||
backend::render::cursor::CursorState,
|
||||
|
|
@ -17,11 +17,12 @@ use crate::{
|
|||
};
|
||||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
iced::{id::Id, widget as iced_widget, Alignment},
|
||||
iced_core::{border::Radius, Background, Border, Color, Length},
|
||||
Apply, Element as CosmicElement, Theme,
|
||||
iced::{Alignment, id::Id, widget as iced_widget},
|
||||
iced_core::{Background, Border, Color, Length, border::Radius},
|
||||
iced_runtime::Task,
|
||||
iced_widget::scrollable::AbsoluteOffset,
|
||||
theme, widget as cosmic_widget, Apply, Element as CosmicElement, Theme,
|
||||
theme, widget as cosmic_widget,
|
||||
};
|
||||
use cosmic_settings_config::shortcuts;
|
||||
use shortcuts::action::{Direction, FocusDirection};
|
||||
|
|
@ -29,15 +30,16 @@ use smithay::{
|
|||
backend::{
|
||||
input::KeyState,
|
||||
renderer::{
|
||||
element::{
|
||||
memory::MemoryRenderBufferRenderElement, surface::WaylandSurfaceRenderElement,
|
||||
AsRenderElements,
|
||||
},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{
|
||||
AsRenderElements, memory::MemoryRenderBufferRenderElement,
|
||||
surface::WaylandSurfaceRenderElement,
|
||||
},
|
||||
},
|
||||
},
|
||||
desktop::{space::SpaceElement, WindowSurfaceType},
|
||||
desktop::{WindowSurfaceType, space::SpaceElement},
|
||||
input::{
|
||||
Seat,
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, CursorImageStatus, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
|
|
@ -49,7 +51,6 @@ use smithay::{
|
|||
DownEvent, MotionEvent as TouchMotionEvent, OrientationEvent, ShapeEvent, TouchTarget,
|
||||
UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
reexports::wayland_server::protocol::wl_surface::WlSurface,
|
||||
|
|
@ -62,8 +63,8 @@ use std::{
|
|||
fmt,
|
||||
hash::Hash,
|
||||
sync::{
|
||||
atomic::{AtomicBool, AtomicU8, AtomicUsize, Ordering},
|
||||
Arc, LazyLock, Mutex,
|
||||
atomic::{AtomicBool, AtomicU8, AtomicUsize, Ordering},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -313,11 +314,7 @@ impl CosmicStack {
|
|||
if let Ok(old) =
|
||||
p.active
|
||||
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |val| {
|
||||
if val < max - 1 {
|
||||
Some(val + 1)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if val < max - 1 { Some(val + 1) } else { None }
|
||||
})
|
||||
{
|
||||
p.previous_keyboard.store(old, Ordering::SeqCst);
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
use cosmic::{
|
||||
Apply,
|
||||
font::Font,
|
||||
iced::{
|
||||
widget::{self, container::draw_background, rule::FillMode},
|
||||
Background,
|
||||
widget::{self, container::draw_background, rule::FillMode},
|
||||
},
|
||||
iced_core::{
|
||||
alignment, event,
|
||||
Border, Clipboard, Color, Length, Rectangle, Shell, Size, alignment, event,
|
||||
layout::{Layout, Limits, Node},
|
||||
mouse, overlay, renderer,
|
||||
widget::{operation::Operation, tree::Tree, Id, Widget},
|
||||
Border, Clipboard, Color, Length, Rectangle, Shell, Size,
|
||||
widget::{Id, Widget, operation::Operation, tree::Tree},
|
||||
},
|
||||
iced_widget::scrollable::AbsoluteOffset,
|
||||
theme,
|
||||
widget::{icon::from_name, Icon},
|
||||
Apply,
|
||||
widget::{Icon, icon::from_name},
|
||||
};
|
||||
|
||||
use super::tab_text::tab_text;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
use std::hash::{Hash, Hasher};
|
||||
|
||||
use cosmic::{
|
||||
iced::{alignment, Point},
|
||||
iced::{Point, alignment},
|
||||
iced_core::{
|
||||
gradient,
|
||||
Background, Border, Color, Degrees, Gradient, Length, Rectangle, Size, Text, gradient,
|
||||
layout::{Layout, Limits, Node},
|
||||
mouse::Cursor,
|
||||
renderer::{self, Renderer as IcedRenderer},
|
||||
text::{LineHeight, Paragraph, Renderer as TextRenderer, Shaping},
|
||||
widget::{tree, Tree, Widget},
|
||||
Background, Border, Color, Degrees, Gradient, Length, Rectangle, Size, Text,
|
||||
widget::{Tree, Widget, tree},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +1,24 @@
|
|||
use super::tab::{Tab, TabBackgroundTheme, TabMessage, TabRuleTheme, MIN_ACTIVE_TAB_WIDTH};
|
||||
use super::tab::{MIN_ACTIVE_TAB_WIDTH, Tab, TabBackgroundTheme, TabMessage, TabRuleTheme};
|
||||
use cosmic::{
|
||||
iced::{id::Id, widget, Element},
|
||||
Apply,
|
||||
iced::{Element, id::Id, widget},
|
||||
iced_core::{
|
||||
event,
|
||||
Background, Border, Clipboard, Color, Length, Point, Rectangle, Renderer, Shell, Size,
|
||||
Vector, event,
|
||||
layout::{Layout, Limits, Node},
|
||||
mouse, overlay, renderer,
|
||||
widget::{
|
||||
Widget,
|
||||
operation::{
|
||||
scrollable::{AbsoluteOffset, RelativeOffset},
|
||||
Operation, Scrollable,
|
||||
scrollable::{AbsoluteOffset, RelativeOffset},
|
||||
},
|
||||
tree::{self, Tree},
|
||||
Widget,
|
||||
},
|
||||
Background, Border, Clipboard, Color, Length, Point, Rectangle, Renderer, Shell, Size,
|
||||
Vector,
|
||||
},
|
||||
iced_widget::container::draw_background,
|
||||
theme,
|
||||
widget::{container::Catalog, icon::from_name},
|
||||
Apply,
|
||||
};
|
||||
use keyframe::{
|
||||
ease,
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ use crate::{
|
|||
|
||||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
Apply,
|
||||
iced::{
|
||||
widget::{container, row},
|
||||
Alignment,
|
||||
widget::{container, row},
|
||||
},
|
||||
iced_core::{Background, Border, Color, Length},
|
||||
theme,
|
||||
widget::{horizontal_space, icon::from_name, text},
|
||||
Apply,
|
||||
};
|
||||
use smithay::utils::{Logical, Size};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,28 +2,28 @@ use crate::wayland::protocols::corner_radius::CacheableCorners;
|
|||
use std::{
|
||||
borrow::Cow,
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Mutex,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use smithay::{
|
||||
backend::renderer::{
|
||||
element::{
|
||||
surface::{render_elements_from_surface_tree, WaylandSurfaceRenderElement},
|
||||
utils::select_dmabuf_feedback,
|
||||
AsRenderElements, Kind, RenderElementStates,
|
||||
},
|
||||
ImportAll, Renderer,
|
||||
element::{
|
||||
AsRenderElements, Kind, RenderElementStates,
|
||||
surface::{WaylandSurfaceRenderElement, render_elements_from_surface_tree},
|
||||
utils::select_dmabuf_feedback,
|
||||
},
|
||||
},
|
||||
desktop::{
|
||||
space::SpaceElement, utils::OutputPresentationFeedback, PopupManager, Window,
|
||||
WindowSurface, WindowSurfaceType,
|
||||
PopupManager, Window, WindowSurface, WindowSurfaceType, space::SpaceElement,
|
||||
utils::OutputPresentationFeedback,
|
||||
},
|
||||
input::{
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
Seat,
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
},
|
||||
output::Output,
|
||||
reexports::{
|
||||
|
|
@ -38,14 +38,14 @@ use smithay::{
|
|||
wayland_server::protocol::wl_surface::WlSurface,
|
||||
},
|
||||
utils::{
|
||||
user_data::UserDataMap, IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size,
|
||||
IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size, user_data::UserDataMap,
|
||||
},
|
||||
wayland::{
|
||||
compositor::{with_states, with_surface_tree_downward, SurfaceData, TraversalAction},
|
||||
compositor::{SurfaceData, TraversalAction, with_states, with_surface_tree_downward},
|
||||
seat::WaylandFocus,
|
||||
shell::xdg::{SurfaceCachedState, ToplevelSurface, XdgToplevelSurfaceData},
|
||||
},
|
||||
xwayland::{xwm::X11Relatable, X11Surface},
|
||||
xwayland::{X11Surface, xwm::X11Relatable},
|
||||
};
|
||||
use tracing::trace;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ use crate::{
|
|||
|
||||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
Apply,
|
||||
iced::widget::{container, horizontal_space, row},
|
||||
iced_core::{Alignment, Background, Border, Color, Length},
|
||||
theme,
|
||||
widget::{icon::from_name, text},
|
||||
Apply,
|
||||
};
|
||||
use smithay::utils::Size;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,15 +16,16 @@ use smithay::{
|
|||
backend::{
|
||||
input::KeyState,
|
||||
renderer::{
|
||||
element::{
|
||||
memory::MemoryRenderBufferRenderElement, surface::WaylandSurfaceRenderElement,
|
||||
AsRenderElements,
|
||||
},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{
|
||||
AsRenderElements, memory::MemoryRenderBufferRenderElement,
|
||||
surface::WaylandSurfaceRenderElement,
|
||||
},
|
||||
},
|
||||
},
|
||||
desktop::{space::SpaceElement, WindowSurfaceType},
|
||||
desktop::{WindowSurfaceType, space::SpaceElement},
|
||||
input::{
|
||||
Seat,
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, CursorIcon, CursorImageStatus, GestureHoldBeginEvent,
|
||||
|
|
@ -36,7 +37,6 @@ use smithay::{
|
|||
DownEvent, MotionEvent as TouchMotionEvent, OrientationEvent, ShapeEvent, TouchTarget,
|
||||
UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
reexports::wayland_server::protocol::wl_surface::WlSurface,
|
||||
|
|
@ -49,8 +49,8 @@ use std::{
|
|||
fmt,
|
||||
hash::Hash,
|
||||
sync::{
|
||||
atomic::{AtomicBool, AtomicU8, Ordering},
|
||||
Arc, Mutex,
|
||||
atomic::{AtomicBool, AtomicU8, Ordering},
|
||||
},
|
||||
};
|
||||
use wayland_backend::server::ObjectId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue