feat: Workspace view closing by pressing current workspace or empty space

This commit is contained in:
Adam Cosner 2025-01-23 20:02:16 -08:00 committed by Ian Douglas Scott
parent e032b0b5ee
commit fd0bdeebbf
2 changed files with 16 additions and 8 deletions

View file

@ -505,6 +505,11 @@ impl Application for App {
return self.hide();
}
Msg::ActivateWorkspace(workspace_handle) => {
if let Some(workspace) = self.workspace_for_handle(&workspace_handle) {
if workspace.is_active {
return self.hide();
}
}
self.send_wayland_cmd(backend::Cmd::ActivateWorkspace(workspace_handle));
}
Msg::ActivateToplevel(toplevel_handle) => {