Handle global workspaces
This commit is contained in:
parent
69a877894a
commit
4e2ef433fd
7 changed files with 87 additions and 40 deletions
|
|
@ -18,11 +18,15 @@ impl WorkspaceHandler for AppData {
|
|||
|
||||
for group in self.workspace_state.workspace_groups() {
|
||||
for workspace in &group.workspaces {
|
||||
if let Some(output) = group.output.as_ref() {
|
||||
if let Some(output_name) = self.output_names.get(&output.id()).unwrap().clone()
|
||||
{
|
||||
workspaces.push((output_name, workspace.clone()));
|
||||
let output_names: Vec<_> = group
|
||||
.outputs
|
||||
.iter()
|
||||
.filter_map(|output| self.output_names.get(&output.id()).cloned()?)
|
||||
.collect();
|
||||
if !output_names.is_empty() {
|
||||
workspaces.push((output_names, workspace.clone()));
|
||||
|
||||
for output in &group.outputs {
|
||||
self.add_capture_source(CaptureSource::Workspace(
|
||||
workspace.handle.clone(),
|
||||
output.clone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue