Update to workspace v2, based on ext-workspace
Requires https://github.com/pop-os/cosmic-protocols/pull/51, https://github.com/pop-os/cosmic-comp/pull/1225. The new protocol version is a hard requirement, and this will panic without it.
This commit is contained in:
parent
7f877f72a3
commit
6b6bf454db
11 changed files with 63 additions and 68 deletions
|
|
@ -192,19 +192,19 @@ impl ScreencopyHandler for AppData {
|
|||
),
|
||||
};
|
||||
match &capture.source {
|
||||
CaptureSource::CosmicToplevel(toplevel) => {
|
||||
CaptureSource::Toplevel(toplevel) => {
|
||||
let info = self
|
||||
.toplevel_info_state
|
||||
.toplevels()
|
||||
.find(|info| info.cosmic_toplevel.as_ref() == Some(&toplevel));
|
||||
.find(|info| info.foreign_toplevel == *toplevel);
|
||||
if let Some(info) = info {
|
||||
self.send_event(Event::ToplevelCapture(info.foreign_toplevel.clone(), image))
|
||||
}
|
||||
}
|
||||
CaptureSource::CosmicWorkspace(workspace) => {
|
||||
CaptureSource::Workspace(workspace) => {
|
||||
self.send_event(Event::WorkspaceCapture(workspace.clone(), image));
|
||||
}
|
||||
CaptureSource::Output(_) | CaptureSource::Toplevel(_) => {
|
||||
CaptureSource::Output(_) => {
|
||||
unreachable!()
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue