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