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;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
use crate::{
|
||||
shell::{element::CosmicMapped, CosmicSurface, MinimizedWindow, Shell},
|
||||
shell::{CosmicSurface, MinimizedWindow, Shell, element::CosmicMapped},
|
||||
state::Common,
|
||||
utils::prelude::*,
|
||||
wayland::handlers::{xdg_shell::PopupGrabData, xwayland_keyboard_grab::XWaylandGrabSeatData},
|
||||
};
|
||||
use indexmap::IndexSet;
|
||||
use smithay::{
|
||||
desktop::{layer_map_for_output, PopupUngrabStrategy},
|
||||
input::{pointer::MotionEvent, Seat},
|
||||
desktop::{PopupUngrabStrategy, layer_map_for_output},
|
||||
input::{Seat, pointer::MotionEvent},
|
||||
output::Output,
|
||||
reexports::wayland_server::{protocol::wl_surface::WlSurface, Resource},
|
||||
utils::{IsAlive, Point, Serial, SERIAL_COUNTER},
|
||||
reexports::wayland_server::{Resource, protocol::wl_surface::WlSurface},
|
||||
utils::{IsAlive, Point, SERIAL_COUNTER, Serial},
|
||||
wayland::{
|
||||
seat::WaylandFocus,
|
||||
selection::{data_device::set_data_device_focus, primary_selection::set_primary_focus},
|
||||
|
|
@ -21,10 +21,10 @@ use std::{borrow::Cow, mem, sync::Mutex};
|
|||
|
||||
use tracing::{debug, trace};
|
||||
|
||||
pub use self::order::{render_input_order, Stage};
|
||||
pub use self::order::{Stage, render_input_order};
|
||||
use self::target::{KeyboardFocusTarget, WindowGroup};
|
||||
|
||||
use super::{grabs::SeatMoveGrabState, layout::floating::FloatingLayout, SeatExt};
|
||||
use super::{SeatExt, grabs::SeatMoveGrabState, layout::floating::FloatingLayout};
|
||||
|
||||
mod order;
|
||||
pub mod target;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::{ops::ControlFlow, time::Instant};
|
|||
use cosmic_comp_config::workspace::WorkspaceLayout;
|
||||
use keyframe::{ease, functions::EaseInOutCubic};
|
||||
use smithay::{
|
||||
desktop::{layer_map_for_output, LayerSurface, PopupKind, PopupManager},
|
||||
desktop::{LayerSurface, PopupKind, PopupManager, layer_map_for_output},
|
||||
output::{Output, OutputNoMode},
|
||||
utils::{Logical, Point},
|
||||
wayland::{session_lock::LockSurface, shell::wlr_layer::Layer},
|
||||
|
|
@ -13,14 +13,14 @@ use smithay::{
|
|||
use crate::{
|
||||
backend::render::ElementFilter,
|
||||
shell::{
|
||||
SeatExt, Shell, Workspace, WorkspaceDelta,
|
||||
focus::target::KeyboardFocusTarget,
|
||||
layout::{floating::FloatingLayout, tiling::ANIMATION_DURATION},
|
||||
SeatExt, Shell, Workspace, WorkspaceDelta,
|
||||
},
|
||||
utils::{
|
||||
geometry::*,
|
||||
prelude::OutputExt,
|
||||
quirks::{workspace_overview_is_open, WORKSPACE_OVERVIEW_NAMESPACE},
|
||||
quirks::{WORKSPACE_OVERVIEW_NAMESPACE, workspace_overview_is_open},
|
||||
},
|
||||
wayland::protocols::workspace::WorkspaceHandle,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ use std::{borrow::Cow, sync::Weak, time::Duration};
|
|||
|
||||
use crate::{
|
||||
shell::{
|
||||
CosmicSurface, SeatExt,
|
||||
element::{CosmicMapped, CosmicStack, CosmicWindow},
|
||||
layout::tiling::ResizeForkTarget,
|
||||
zoom::ZoomFocusTarget,
|
||||
CosmicSurface, SeatExt,
|
||||
},
|
||||
utils::prelude::*,
|
||||
wayland::handlers::{screencopy::SessionHolder, xdg_shell::popup::get_popup_toplevel},
|
||||
|
|
@ -13,8 +13,9 @@ use crate::{
|
|||
use id_tree::NodeId;
|
||||
use smithay::{
|
||||
backend::input::KeyState,
|
||||
desktop::{space::SpaceElement, LayerSurface, PopupKind, WindowSurface, WindowSurfaceType},
|
||||
desktop::{LayerSurface, PopupKind, WindowSurface, WindowSurfaceType, space::SpaceElement},
|
||||
input::{
|
||||
Seat,
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
|
|
@ -26,14 +27,13 @@ use smithay::{
|
|||
DownEvent, MotionEvent as TouchMotionEvent, OrientationEvent, ShapeEvent, TouchTarget,
|
||||
UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
reexports::wayland_server::{
|
||||
backend::ObjectId, protocol::wl_surface::WlSurface, Client, Resource,
|
||||
Client, Resource, backend::ObjectId, protocol::wl_surface::WlSurface,
|
||||
},
|
||||
utils::{IsAlive, Logical, Point, Serial, Transform},
|
||||
wayland::{seat::WaylandFocus, session_lock::LockSurface},
|
||||
xwayland::{xwm::XwmId, X11Surface},
|
||||
xwayland::{X11Surface, xwm::XwmId},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ use crate::{
|
|||
config::Config,
|
||||
fl,
|
||||
shell::{
|
||||
CosmicSurface, PointGlobalExt, Shell,
|
||||
element::{CosmicMapped, CosmicWindow},
|
||||
grabs::ReleaseMode,
|
||||
CosmicSurface, PointGlobalExt, Shell,
|
||||
},
|
||||
state::State,
|
||||
utils::{prelude::SeatExt, screenshot::screenshot_window},
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
use cosmic::{
|
||||
iced::Element,
|
||||
iced_core::{
|
||||
event, layout, mouse, overlay,
|
||||
renderer::{Quad, Style},
|
||||
widget::{tree, Id, Tree, Widget},
|
||||
Background, Border, Clipboard, Color, Event, Layout, Length, Rectangle,
|
||||
Renderer as IcedRenderer, Shell, Size,
|
||||
Renderer as IcedRenderer, Shell, Size, event, layout, mouse, overlay,
|
||||
renderer::{Quad, Style},
|
||||
widget::{Id, Tree, Widget, tree},
|
||||
},
|
||||
widget::button::Catalog,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,30 +1,31 @@
|
|||
use std::{
|
||||
fmt,
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc, Mutex,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
};
|
||||
|
||||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
Apply as _, Task,
|
||||
iced::{Alignment, Background},
|
||||
iced_core::{alignment::Horizontal, Border, Length, Rectangle as IcedRectangle},
|
||||
iced_widget::{self, text::Style as TextStyle, Column, Row},
|
||||
iced_core::{Border, Length, Rectangle as IcedRectangle, alignment::Horizontal},
|
||||
iced_widget::{self, Column, Row, text::Style as TextStyle},
|
||||
theme,
|
||||
widget::{button, divider, horizontal_space, icon::from_name, text},
|
||||
Apply as _, Task,
|
||||
};
|
||||
use smithay::{
|
||||
backend::{
|
||||
input::{ButtonState, TouchSlot},
|
||||
renderer::{
|
||||
element::{memory::MemoryRenderBufferRenderElement, AsRenderElements},
|
||||
ImportMem, Renderer,
|
||||
element::{AsRenderElements, memory::MemoryRenderBufferRenderElement},
|
||||
},
|
||||
},
|
||||
desktop::space::SpaceElement,
|
||||
input::{
|
||||
Seat,
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent,
|
||||
|
|
@ -36,14 +37,13 @@ use smithay::{
|
|||
DownEvent, GrabStartData as TouchGrabStartData, MotionEvent as TouchMotionEvent,
|
||||
TouchGrab, TouchInnerHandle, TouchTarget, UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
utils::{Logical, Point, Rectangle, Serial, Size},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
shell::{focus::target::PointerFocusTarget, SeatExt},
|
||||
shell::{SeatExt, focus::target::PointerFocusTarget},
|
||||
state::State,
|
||||
utils::{
|
||||
iced::{IcedElement, Program},
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
use crate::{
|
||||
backend::render::{
|
||||
cursor::CursorState, element::AsGlowRenderer, BackdropShader, IndicatorShader, Key, Usage,
|
||||
BackdropShader, IndicatorShader, Key, Usage, cursor::CursorState, element::AsGlowRenderer,
|
||||
},
|
||||
shell::{
|
||||
CosmicMapped, CosmicSurface, Direction, ManagedLayer,
|
||||
element::{
|
||||
stack_hover::{stack_hover, StackHover},
|
||||
CosmicMappedRenderElement,
|
||||
stack_hover::{StackHover, stack_hover},
|
||||
},
|
||||
focus::target::{KeyboardFocusTarget, PointerFocusTarget},
|
||||
layout::floating::TiledCorners,
|
||||
CosmicMapped, CosmicSurface, Direction, ManagedLayer,
|
||||
},
|
||||
utils::prelude::*,
|
||||
wayland::protocols::toplevel_info::{toplevel_enter_output, toplevel_enter_workspace},
|
||||
|
|
@ -23,12 +23,13 @@ use smithay::{
|
|||
backend::{
|
||||
input::ButtonState,
|
||||
renderer::{
|
||||
element::{utils::RescaleRenderElement, AsRenderElements, RenderElement},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{AsRenderElements, RenderElement, utils::RescaleRenderElement},
|
||||
},
|
||||
},
|
||||
desktop::{layer_map_for_output, space::SpaceElement, WindowSurfaceType},
|
||||
desktop::{WindowSurfaceType, layer_map_for_output, space::SpaceElement},
|
||||
input::{
|
||||
Seat,
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, CursorIcon, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent,
|
||||
|
|
@ -37,14 +38,13 @@ use smithay::{
|
|||
RelativeMotionEvent,
|
||||
},
|
||||
touch::{self, GrabStartData as TouchGrabStartData, TouchGrab, TouchInnerHandle},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
utils::{IsAlive, Logical, Point, Rectangle, Scale, Serial, SERIAL_COUNTER},
|
||||
utils::{IsAlive, Logical, Point, Rectangle, SERIAL_COUNTER, Scale, Serial},
|
||||
};
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
sync::{atomic::Ordering, Mutex},
|
||||
sync::{Mutex, atomic::Ordering},
|
||||
time::Instant,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ use crate::{
|
|||
};
|
||||
use smithay::{
|
||||
backend::input::ButtonState,
|
||||
desktop::{space::SpaceElement, WindowSurface},
|
||||
desktop::{WindowSurface, space::SpaceElement},
|
||||
input::{
|
||||
Seat,
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, CursorIcon, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent,
|
||||
|
|
@ -26,7 +27,6 @@ use smithay::{
|
|||
DownEvent, GrabStartData as TouchGrabStartData, MotionEvent as TouchMotionEvent,
|
||||
OrientationEvent, ShapeEvent, TouchGrab, TouchInnerHandle, UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
utils::{IsAlive, Logical, Point, Rectangle, Serial, Size},
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ use cosmic_settings_config::shortcuts::action::ResizeDirection;
|
|||
use keyframe::{ease, functions::EaseInOutCubic};
|
||||
use smithay::{
|
||||
backend::renderer::{
|
||||
element::{
|
||||
utils::{Relocate, RelocateRenderElement, RescaleRenderElement},
|
||||
AsRenderElements, RenderElement,
|
||||
},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{
|
||||
AsRenderElements, RenderElement,
|
||||
utils::{Relocate, RelocateRenderElement, RescaleRenderElement},
|
||||
},
|
||||
},
|
||||
desktop::{layer_map_for_output, space::SpaceElement, PopupKind, Space, WindowSurfaceType},
|
||||
desktop::{PopupKind, Space, WindowSurfaceType, layer_map_for_output, space::SpaceElement},
|
||||
input::Seat,
|
||||
output::Output,
|
||||
utils::{IsAlive, Logical, Point, Rectangle, Scale, Size},
|
||||
|
|
@ -24,20 +24,20 @@ use smithay::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
backend::render::{element::AsGlowRenderer, IndicatorShader, Key, Usage},
|
||||
backend::render::{IndicatorShader, Key, Usage, element::AsGlowRenderer},
|
||||
shell::{
|
||||
CosmicSurface, Direction, ManagedLayer, MoveResult, ResizeMode,
|
||||
element::{
|
||||
CosmicMapped, CosmicMappedRenderElement, CosmicWindow, MaximizedState,
|
||||
resize_indicator::ResizeIndicator,
|
||||
stack::{CosmicStackRenderElement, MoveResult as StackMoveResult, TAB_HEIGHT},
|
||||
window::CosmicWindowRenderElement,
|
||||
CosmicMapped, CosmicMappedRenderElement, CosmicWindow, MaximizedState,
|
||||
},
|
||||
focus::{
|
||||
target::{KeyboardFocusTarget, PointerFocusTarget},
|
||||
FocusStackMut,
|
||||
target::{KeyboardFocusTarget, PointerFocusTarget},
|
||||
},
|
||||
grabs::{GrabStartData, ReleaseMode, ResizeEdge},
|
||||
CosmicSurface, Direction, ManagedLayer, MoveResult, ResizeMode,
|
||||
},
|
||||
state::State,
|
||||
utils::{prelude::*, tween::EaseRectangle},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use crate::shell::element::CosmicSurface;
|
||||
use smithay::{
|
||||
reexports::wayland_server::{backend::ClientId, Client, Resource},
|
||||
reexports::wayland_server::{Client, Resource, backend::ClientId},
|
||||
utils::{IsAlive, Serial},
|
||||
wayland::{
|
||||
compositor::{Blocker, BlockerState},
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ use id_tree::{NodeId, Tree};
|
|||
use smithay::{
|
||||
backend::input::ButtonState,
|
||||
input::{
|
||||
Seat,
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, CursorIcon, Focus, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent,
|
||||
|
|
@ -24,7 +25,6 @@ use smithay::{
|
|||
DownEvent, GrabStartData as TouchGrabStartData, MotionEvent as TouchMotionEvent,
|
||||
OrientationEvent, ShapeEvent, TouchGrab, TouchInnerHandle, TouchTarget, UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::WeakOutput,
|
||||
utils::{IsAlive, Logical, Point, Serial},
|
||||
|
|
|
|||
|
|
@ -2,18 +2,18 @@ use cosmic_settings_config::shortcuts;
|
|||
use smithay::{
|
||||
backend::input::{KeyState, Keycode},
|
||||
input::{
|
||||
Seat, SeatHandler,
|
||||
keyboard::{
|
||||
GrabStartData as KeyboardGrabStartData, KeyboardGrab, KeyboardInnerHandle,
|
||||
ModifiersState,
|
||||
},
|
||||
Seat, SeatHandler,
|
||||
},
|
||||
utils::Serial,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
config::key_bindings::cosmic_modifiers_from_smithay,
|
||||
shell::{layout::tiling::NodeDesc, Trigger},
|
||||
shell::{Trigger, layout::tiling::NodeDesc},
|
||||
state::State,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,14 @@
|
|||
|
||||
use crate::{
|
||||
backend::render::{
|
||||
element::AsGlowRenderer, BackdropShader, IndicatorShader, Key, Usage, ACTIVE_GROUP_COLOR,
|
||||
GROUP_COLOR,
|
||||
ACTIVE_GROUP_COLOR, BackdropShader, GROUP_COLOR, IndicatorShader, Key, Usage,
|
||||
element::AsGlowRenderer,
|
||||
},
|
||||
shell::{
|
||||
CosmicSurface, Direction, FocusResult, MoveResult, OutputNotMapped, OverviewMode,
|
||||
ResizeMode, Trigger,
|
||||
element::{
|
||||
CosmicMapped, CosmicMappedRenderElement, CosmicStack, CosmicWindow,
|
||||
resize_indicator::ResizeIndicator,
|
||||
stack::{
|
||||
CosmicStackRenderElement, MoveResult as StackMoveResult,
|
||||
|
|
@ -14,16 +17,13 @@ use crate::{
|
|||
},
|
||||
swap_indicator::SwapIndicator,
|
||||
window::CosmicWindowRenderElement,
|
||||
CosmicMapped, CosmicMappedRenderElement, CosmicStack, CosmicWindow,
|
||||
},
|
||||
focus::{
|
||||
target::{KeyboardFocusTarget, PointerFocusTarget, WindowGroup},
|
||||
FocusStackMut, FocusTarget,
|
||||
target::{KeyboardFocusTarget, PointerFocusTarget, WindowGroup},
|
||||
},
|
||||
grabs::ResizeEdge,
|
||||
layout::Orientation,
|
||||
CosmicSurface, Direction, FocusResult, MoveResult, OutputNotMapped, OverviewMode,
|
||||
ResizeMode, Trigger,
|
||||
},
|
||||
utils::{prelude::*, tween::EaseRectangle},
|
||||
wayland::{
|
||||
|
|
@ -46,17 +46,17 @@ use keyframe::{
|
|||
};
|
||||
use smithay::{
|
||||
backend::renderer::{
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{
|
||||
utils::{
|
||||
constrain_render_elements, ConstrainAlign, ConstrainScaleBehavior,
|
||||
RescaleRenderElement,
|
||||
},
|
||||
AsRenderElements, Id, RenderElement,
|
||||
utils::{
|
||||
ConstrainAlign, ConstrainScaleBehavior, RescaleRenderElement,
|
||||
constrain_render_elements,
|
||||
},
|
||||
},
|
||||
glow::GlowRenderer,
|
||||
ImportAll, ImportMem, Renderer,
|
||||
},
|
||||
desktop::{layer_map_for_output, space::SpaceElement, PopupKind, WindowSurfaceType},
|
||||
desktop::{PopupKind, WindowSurfaceType, layer_map_for_output, space::SpaceElement},
|
||||
input::Seat,
|
||||
output::Output,
|
||||
reexports::wayland_server::Client,
|
||||
|
|
@ -2209,12 +2209,14 @@ impl TilingLayout {
|
|||
Data::Group { alive, .. } => KeyboardFocusTarget::Group(WindowGroup {
|
||||
node: node_id.clone(),
|
||||
alive: Arc::downgrade(alive),
|
||||
focus_stack: vec![new_elements[0]
|
||||
.tiling_node_id
|
||||
.lock()
|
||||
.unwrap()
|
||||
.clone()
|
||||
.unwrap()],
|
||||
focus_stack: vec![
|
||||
new_elements[0]
|
||||
.tiling_node_id
|
||||
.lock()
|
||||
.unwrap()
|
||||
.clone()
|
||||
.unwrap(),
|
||||
],
|
||||
}),
|
||||
Data::Mapped { mapped, .. } => KeyboardFocusTarget::Element(mapped.clone()),
|
||||
_ => unreachable!(),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use indexmap::IndexMap;
|
|||
use layout::TilingExceptions;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
sync::{atomic::Ordering, Mutex},
|
||||
sync::{Mutex, atomic::Ordering},
|
||||
thread,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
|
@ -19,8 +19,8 @@ use crate::{
|
|||
},
|
||||
};
|
||||
use cosmic_comp_config::{
|
||||
workspace::{PinnedWorkspace, WorkspaceLayout, WorkspaceMode},
|
||||
TileBehavior, ZoomConfig, ZoomMovement,
|
||||
workspace::{PinnedWorkspace, WorkspaceLayout, WorkspaceMode},
|
||||
};
|
||||
use cosmic_config::ConfigSet;
|
||||
use cosmic_protocols::workspace::v2::server::zcosmic_workspace_handle_v2::TilingState;
|
||||
|
|
@ -30,28 +30,27 @@ use keyframe::{ease, functions::EaseInOutCubic};
|
|||
use smithay::{
|
||||
backend::{input::TouchSlot, renderer::element::RenderElementStates},
|
||||
desktop::{
|
||||
layer_map_for_output,
|
||||
LayerSurface, PopupKind, WindowSurface, WindowSurfaceType, layer_map_for_output,
|
||||
space::SpaceElement,
|
||||
utils::{
|
||||
surface_presentation_feedback_flags_from_states, surface_primary_scanout_output,
|
||||
take_presentation_feedback_surface_tree, OutputPresentationFeedback,
|
||||
OutputPresentationFeedback, surface_presentation_feedback_flags_from_states,
|
||||
surface_primary_scanout_output, take_presentation_feedback_surface_tree,
|
||||
},
|
||||
LayerSurface, PopupKind, WindowSurface, WindowSurfaceType,
|
||||
},
|
||||
input::{
|
||||
Seat,
|
||||
pointer::{
|
||||
CursorImageStatus, CursorImageSurfaceData, Focus, GrabStartData as PointerGrabStartData,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::{Output, WeakOutput},
|
||||
reexports::{
|
||||
wayland_protocols::ext::session_lock::v1::server::ext_session_lock_v1::ExtSessionLockV1,
|
||||
wayland_server::{protocol::wl_surface::WlSurface, Client},
|
||||
wayland_server::{Client, protocol::wl_surface::WlSurface},
|
||||
},
|
||||
utils::{IsAlive, Logical, Point, Rectangle, Serial, Size},
|
||||
wayland::{
|
||||
compositor::{with_states, SurfaceAttributes},
|
||||
compositor::{SurfaceAttributes, with_states},
|
||||
seat::WaylandFocus,
|
||||
session_lock::LockSurface,
|
||||
shell::wlr_layer::{KeyboardInteractivity, Layer, LayerSurfaceCachedState},
|
||||
|
|
@ -73,8 +72,8 @@ use crate::{
|
|||
},
|
||||
protocols::{
|
||||
toplevel_info::{
|
||||
toplevel_enter_output, toplevel_enter_workspace, toplevel_leave_output,
|
||||
toplevel_leave_workspace, ToplevelInfoState,
|
||||
ToplevelInfoState, toplevel_enter_output, toplevel_enter_workspace,
|
||||
toplevel_leave_output, toplevel_leave_workspace,
|
||||
},
|
||||
workspace::{
|
||||
WorkspaceGroupHandle, WorkspaceHandle, WorkspaceState, WorkspaceUpdateGuard,
|
||||
|
|
@ -97,14 +96,14 @@ use self::zoom::{OutputZoomState, ZoomState};
|
|||
|
||||
use self::{
|
||||
element::{
|
||||
resize_indicator::{resize_indicator, ResizeIndicator},
|
||||
swap_indicator::{swap_indicator, SwapIndicator},
|
||||
CosmicWindow, MaximizedState,
|
||||
resize_indicator::{ResizeIndicator, resize_indicator},
|
||||
swap_indicator::{SwapIndicator, swap_indicator},
|
||||
},
|
||||
focus::target::{KeyboardFocusTarget, PointerFocusTarget},
|
||||
grabs::{
|
||||
tab_items, window_items, GrabStartData, Item, MenuGrab, MoveGrab, ReleaseMode, ResizeEdge,
|
||||
ResizeGrab,
|
||||
GrabStartData, Item, MenuGrab, MoveGrab, ReleaseMode, ResizeEdge, ResizeGrab, tab_items,
|
||||
window_items,
|
||||
},
|
||||
layout::{
|
||||
floating::{FloatingLayout, ResizeState},
|
||||
|
|
@ -2030,11 +2029,7 @@ impl Shell {
|
|||
Direction::Left => current_output_geo.loc.x - origin.x,
|
||||
Direction::Right => origin.x - current_output_geo.loc.x,
|
||||
};
|
||||
if res > 0 {
|
||||
Some((o, res))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if res > 0 { Some((o, res)) } else { None }
|
||||
})
|
||||
.min_by_key(|(_, res)| *res)
|
||||
.map(|(o, _)| o)
|
||||
|
|
@ -3766,41 +3761,25 @@ impl Shell {
|
|||
.filter(|(_, other_geo)| other_geo.loc.y <= geometry.loc.y)
|
||||
.min_by_key(|(_, other_geo)| {
|
||||
let res = geometry.loc.y - other_geo.loc.y;
|
||||
if res.is_positive() {
|
||||
res
|
||||
} else {
|
||||
i32::MAX
|
||||
}
|
||||
if res.is_positive() { res } else { i32::MAX }
|
||||
}),
|
||||
FocusDirection::Down => elements
|
||||
.filter(|(_, other_geo)| other_geo.loc.y > geometry.loc.y)
|
||||
.max_by_key(|(_, other_geo)| {
|
||||
let res = geometry.loc.y - other_geo.loc.y;
|
||||
if res.is_negative() {
|
||||
res
|
||||
} else {
|
||||
i32::MIN
|
||||
}
|
||||
if res.is_negative() { res } else { i32::MIN }
|
||||
}),
|
||||
FocusDirection::Left => elements
|
||||
.filter(|(_, other_geo)| other_geo.loc.x <= geometry.loc.x)
|
||||
.min_by_key(|(_, other_geo)| {
|
||||
let res = geometry.loc.x - other_geo.loc.x;
|
||||
if res.is_positive() {
|
||||
res
|
||||
} else {
|
||||
i32::MAX
|
||||
}
|
||||
if res.is_positive() { res } else { i32::MAX }
|
||||
}),
|
||||
FocusDirection::Right => elements
|
||||
.filter(|(_, other_geo)| other_geo.loc.x > geometry.loc.x)
|
||||
.max_by_key(|(_, other_geo)| {
|
||||
let res = geometry.loc.x - other_geo.loc.x;
|
||||
if res.is_negative() {
|
||||
res
|
||||
} else {
|
||||
i32::MIN
|
||||
}
|
||||
if res.is_negative() { res } else { i32::MIN }
|
||||
}),
|
||||
_ => return FocusResult::None,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use std::{any::Any, cell::RefCell, collections::HashMap, sync::Mutex};
|
|||
|
||||
use crate::{
|
||||
backend::render::cursor::CursorState,
|
||||
config::{xkb_config_to_wl, Config},
|
||||
config::{Config, xkb_config_to_wl},
|
||||
input::{ModifiersShortcutQueue, SupressedButtons, SupressedKeys},
|
||||
state::State,
|
||||
};
|
||||
|
|
@ -12,9 +12,9 @@ use smithay::{
|
|||
backend::input::{Device, DeviceCapability},
|
||||
desktop::utils::bbox_from_surface_tree,
|
||||
input::{
|
||||
Seat, SeatState,
|
||||
keyboard::{LedState, XkbConfig},
|
||||
pointer::{CursorImageAttributes, CursorImageStatus},
|
||||
Seat, SeatState,
|
||||
},
|
||||
output::Output,
|
||||
reexports::{input::Device as InputDevice, wayland_server::DisplayHandle},
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ use crate::shell::layout::tiling::RestoreTilingState;
|
|||
use crate::wayland::handlers::xdg_activation::ActivationContext;
|
||||
use crate::{
|
||||
backend::render::{
|
||||
element::{AsGlowRenderer, FromGlesError},
|
||||
BackdropShader,
|
||||
element::{AsGlowRenderer, FromGlesError},
|
||||
},
|
||||
shell::{
|
||||
ANIMATION_DURATION, OverviewMode,
|
||||
layout::{floating::FloatingLayout, tiling::TilingLayout},
|
||||
OverviewMode, ANIMATION_DURATION,
|
||||
},
|
||||
state::State,
|
||||
utils::{prelude::*, tween::EaseRectangle},
|
||||
|
|
@ -30,16 +30,16 @@ use keyframe::{ease, functions::EaseInOutCubic};
|
|||
use smithay::output::WeakOutput;
|
||||
use smithay::{
|
||||
backend::renderer::{
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{
|
||||
surface::WaylandSurfaceRenderElement, texture::TextureRenderElement,
|
||||
utils::RescaleRenderElement, Element, Id, RenderElement,
|
||||
Element, Id, RenderElement, surface::WaylandSurfaceRenderElement,
|
||||
texture::TextureRenderElement, utils::RescaleRenderElement,
|
||||
},
|
||||
gles::GlesTexture,
|
||||
glow::GlowRenderer,
|
||||
utils::{DamageSet, OpaqueRegions},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
},
|
||||
desktop::{layer_map_for_output, space::SpaceElement, WindowSurfaceType},
|
||||
desktop::{WindowSurfaceType, layer_map_for_output, space::SpaceElement},
|
||||
input::Seat,
|
||||
output::Output,
|
||||
reexports::wayland_server::Client,
|
||||
|
|
@ -54,18 +54,18 @@ use std::{
|
|||
use wayland_backend::server::ClientId;
|
||||
|
||||
use super::{
|
||||
CosmicMappedRenderElement, CosmicSurface, ResizeDirection, ResizeMode,
|
||||
element::{
|
||||
resize_indicator::ResizeIndicator, stack::CosmicStackRenderElement,
|
||||
swap_indicator::SwapIndicator, window::CosmicWindowRenderElement, CosmicMapped,
|
||||
MaximizedState,
|
||||
CosmicMapped, MaximizedState, resize_indicator::ResizeIndicator,
|
||||
stack::CosmicStackRenderElement, swap_indicator::SwapIndicator,
|
||||
window::CosmicWindowRenderElement,
|
||||
},
|
||||
focus::{
|
||||
target::{KeyboardFocusTarget, PointerFocusTarget, WindowGroup},
|
||||
FocusStack, FocusStackMut,
|
||||
target::{KeyboardFocusTarget, PointerFocusTarget, WindowGroup},
|
||||
},
|
||||
grabs::ResizeEdge,
|
||||
layout::tiling::{Data, NodeDesc},
|
||||
CosmicMappedRenderElement, CosmicSurface, ResizeDirection, ResizeMode,
|
||||
};
|
||||
|
||||
const FULLSCREEN_ANIMATION_DURATION: Duration = Duration::from_millis(200);
|
||||
|
|
|
|||
|
|
@ -2,18 +2,19 @@ use std::{sync::Mutex, time::Instant};
|
|||
|
||||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
iced::{alignment::Vertical, Alignment, Background, Border, Length},
|
||||
Apply,
|
||||
iced::{Alignment, Background, Border, Length, alignment::Vertical},
|
||||
iced_widget, theme,
|
||||
widget::{self, icon::Named},
|
||||
Apply,
|
||||
};
|
||||
use cosmic_comp_config::ZoomMovement;
|
||||
use cosmic_config::ConfigSet;
|
||||
use keyframe::{ease, functions::EaseInOutCubic};
|
||||
use smithay::{
|
||||
backend::renderer::{element::AsRenderElements, ImportMem, Renderer},
|
||||
backend::renderer::{ImportMem, Renderer, element::AsRenderElements},
|
||||
desktop::space::SpaceElement,
|
||||
input::{
|
||||
Seat,
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, Focus, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent,
|
||||
|
|
@ -24,7 +25,6 @@ use smithay::{
|
|||
DownEvent, MotionEvent as TouchMotionEvent, OrientationEvent, ShapeEvent, TouchTarget,
|
||||
UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
utils::{IsAlive, Point, Rectangle, Serial, Size},
|
||||
|
|
@ -42,10 +42,9 @@ use crate::{
|
|||
};
|
||||
|
||||
use super::{
|
||||
check_grab_preconditions,
|
||||
ANIMATION_DURATION, check_grab_preconditions,
|
||||
focus::target::PointerFocusTarget,
|
||||
grabs::{ContextMenu, Item, MenuAlignment, MenuGrab},
|
||||
ANIMATION_DURATION,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue