Format imports
This commit is contained in:
parent
76daf6e980
commit
ee1d54a12b
8 changed files with 42 additions and 34 deletions
1
rustfmt.toml
Normal file
1
rustfmt.toml
Normal file
|
|
@ -0,0 +1 @@
|
|||
imports_granularity = "Crate"
|
||||
|
|
@ -187,7 +187,7 @@ impl AppData {
|
|||
}
|
||||
}
|
||||
|
||||
fn start(conn: Connection) -> mpsc::Receiver<Event> {
|
||||
fn start(_conn: Connection) -> mpsc::Receiver<Event> {
|
||||
let (sender, receiver) = mpsc::channel(20);
|
||||
thread::spawn(move || {
|
||||
let mut event_loop = calloop::EventLoop::try_new().unwrap();
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ use cctk::{
|
|||
Connection, Dispatch, QueueHandle,
|
||||
},
|
||||
};
|
||||
use cosmic::cctk;
|
||||
use cosmic::iced_sctk::subsurface_widget::{BufferSource, Dmabuf, Plane, Shmbuf};
|
||||
use rustix::{io::Errno, shm::ShmOFlags};
|
||||
use cosmic::{
|
||||
cctk,
|
||||
iced_sctk::subsurface_widget::{BufferSource, Dmabuf, Plane, Shmbuf},
|
||||
};
|
||||
use std::{
|
||||
os::fd::{AsFd, OwnedFd},
|
||||
os::fd::AsFd,
|
||||
path::{Path, PathBuf},
|
||||
sync::Arc,
|
||||
time::{SystemTime, UNIX_EPOCH},
|
||||
};
|
||||
use wayland_protocols::wp::linux_dmabuf::zv1::client::zwp_linux_buffer_params_v1;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,12 @@ use cctk::{
|
|||
},
|
||||
workspace::WorkspaceState,
|
||||
};
|
||||
use cosmic::cctk;
|
||||
use cosmic::iced::{
|
||||
self,
|
||||
futures::{executor::block_on, FutureExt, SinkExt},
|
||||
use cosmic::{
|
||||
cctk,
|
||||
iced::{
|
||||
self,
|
||||
futures::{executor::block_on, FutureExt, SinkExt},
|
||||
},
|
||||
};
|
||||
use futures_channel::mpsc;
|
||||
use std::{cell::RefCell, collections::HashMap, fs, path::PathBuf, sync::Arc, thread};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
use cosmic::cctk::{
|
||||
self,
|
||||
cosmic_protocols::screencopy::v2::client::{
|
||||
zcosmic_screencopy_frame_v2, zcosmic_screencopy_manager_v2, zcosmic_screencopy_session_v2,
|
||||
use cosmic::{
|
||||
cctk::{
|
||||
self,
|
||||
cosmic_protocols::screencopy::v2::client::{
|
||||
zcosmic_screencopy_frame_v2, zcosmic_screencopy_manager_v2,
|
||||
zcosmic_screencopy_session_v2,
|
||||
},
|
||||
screencopy::{
|
||||
capture, Formats, Frame, ScreencopyFrameData, ScreencopyFrameDataExt,
|
||||
ScreencopyHandler, ScreencopySessionData, ScreencopySessionDataExt, ScreencopyState,
|
||||
},
|
||||
wayland_client::{Connection, Proxy, QueueHandle, WEnum},
|
||||
},
|
||||
screencopy::{
|
||||
capture, Formats, Frame, ScreencopyFrameData, ScreencopyFrameDataExt, ScreencopyHandler,
|
||||
ScreencopySessionData, ScreencopySessionDataExt, ScreencopyState,
|
||||
},
|
||||
wayland_client::{Connection, Proxy, QueueHandle, WEnum},
|
||||
iced_sctk::subsurface_widget::{SubsurfaceBuffer, SubsurfaceBufferRelease},
|
||||
};
|
||||
use cosmic::iced_sctk::subsurface_widget::{SubsurfaceBuffer, SubsurfaceBufferRelease};
|
||||
use std::{
|
||||
array,
|
||||
sync::{Arc, Weak},
|
||||
|
|
|
|||
|
|
@ -496,8 +496,8 @@ impl Application for App {
|
|||
}
|
||||
Msg::StartDrag(size, drag_surface) => {
|
||||
let (output, mime_type) = match &drag_surface {
|
||||
DragSurface::Workspace { handle, output } => (output, &*WORKSPACE_MIME),
|
||||
DragSurface::Toplevel { handle, output } => (output, &*TOPLEVEL_MIME),
|
||||
DragSurface::Workspace { handle: _, output } => (output, &*WORKSPACE_MIME),
|
||||
DragSurface::Toplevel { handle: _, output } => (output, &*TOPLEVEL_MIME),
|
||||
};
|
||||
let id = SurfaceId::unique();
|
||||
if let Some((parent_id, _)) = self
|
||||
|
|
|
|||
|
|
@ -1,17 +1,19 @@
|
|||
// Renders image behind widget, and otherwise passes through all behavior
|
||||
|
||||
use cosmic::iced::{
|
||||
advanced::{
|
||||
layout::{self},
|
||||
mouse, overlay, renderer,
|
||||
widget::{tree, Operation, OperationOutputWrapper, Tree},
|
||||
Clipboard, Layout, Shell, Widget,
|
||||
use cosmic::{
|
||||
iced::{
|
||||
advanced::{
|
||||
layout::{self},
|
||||
mouse, overlay, renderer,
|
||||
widget::{tree, Operation, OperationOutputWrapper, Tree},
|
||||
Clipboard, Layout, Shell, Widget,
|
||||
},
|
||||
event::{self, Event},
|
||||
widget::image::{FilterMethod, Handle},
|
||||
ContentFit, Length, Rectangle, Size, Vector,
|
||||
},
|
||||
event::{self, Event},
|
||||
widget::image::{FilterMethod, Handle},
|
||||
ContentFit, Length, Rectangle, Size, Vector,
|
||||
iced_core::Renderer,
|
||||
};
|
||||
use cosmic::iced_core::Renderer;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
use cosmic::iced::{
|
||||
advanced::{
|
||||
layout, mouse, overlay, renderer,
|
||||
widget::{tree, Id, Operation, OperationOutputWrapper, Tree},
|
||||
layout, mouse, renderer,
|
||||
widget::{Operation, OperationOutputWrapper, Tree},
|
||||
Clipboard, Layout, Shell, Widget,
|
||||
},
|
||||
event::{self, Event},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue