image-copy: Use abstraction that's now provided by Smithay
This doesn't change much, since the Smithay implementation is based on the `cosmic-comp` version, but made more generic. We provide our own implementation for our workspace capture protocol, but otherwise Smithay handles the boilerplate now. This should not cause any change in behavior.
This commit is contained in:
parent
0f7e53b600
commit
cac7a5aca6
16 changed files with 285 additions and 1536 deletions
|
|
@ -12,7 +12,7 @@ use crate::{
|
|||
zoom::ZoomFocusTarget,
|
||||
},
|
||||
utils::prelude::*,
|
||||
wayland::handlers::{screencopy::SessionHolder, xdg_shell::popup::get_popup_toplevel},
|
||||
wayland::handlers::{image_copy_capture::SessionHolder, xdg_shell::popup::get_popup_toplevel},
|
||||
};
|
||||
use id_tree::NodeId;
|
||||
use smithay::{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use crate::{
|
|||
state::State,
|
||||
utils::{prelude::*, tween::EaseRectangle},
|
||||
wayland::{
|
||||
handlers::screencopy::ScreencopySessions,
|
||||
handlers::image_copy_capture::ImageCopySessions,
|
||||
protocols::{
|
||||
toplevel_info::{toplevel_enter_output, toplevel_leave_output},
|
||||
workspace::{WorkspaceHandle, WorkspaceUpdateGuard},
|
||||
|
|
@ -110,7 +110,7 @@ pub struct Workspace {
|
|||
|
||||
pub handle: WorkspaceHandle,
|
||||
pub focus_stack: FocusStacks,
|
||||
pub screencopy: ScreencopySessions,
|
||||
pub image_copy: ImageCopySessions,
|
||||
output_stack: VecDeque<OutputMatch>,
|
||||
pub(super) backdrop_id: Id,
|
||||
pub dirty: AtomicBool,
|
||||
|
|
@ -377,7 +377,7 @@ impl Workspace {
|
|||
id: None,
|
||||
handle,
|
||||
focus_stack: FocusStacks::default(),
|
||||
screencopy: ScreencopySessions::default(),
|
||||
image_copy: ImageCopySessions::default(),
|
||||
output_stack: {
|
||||
let mut queue = VecDeque::new();
|
||||
queue.push_back(output_match);
|
||||
|
|
@ -410,7 +410,7 @@ impl Workspace {
|
|||
id: pinned.id.clone(),
|
||||
handle,
|
||||
focus_stack: FocusStacks::default(),
|
||||
screencopy: ScreencopySessions::default(),
|
||||
image_copy: ImageCopySessions::default(),
|
||||
output_stack: {
|
||||
let mut queue = VecDeque::new();
|
||||
queue.push_back(pinned.output.clone());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue