Fixed bug where fullscreen could crash when changing workspaces
use rustwlc::WlcOutput;
use petgraph::graph::NodeIndex;
use uuid::Uuid;
-use super::super::{LayoutTree, TreeError};
+use super::super::{LayoutTree, TreeError, FocusError};
use super::super::core::container::{Container, ContainerType, Layout, Handle};
use ::debug_enabled;
@@ -148,8 +148,15 @@ impl LayoutTree {
},
_ => unreachable!()
}
- self.set_active_node(active_ix)
- .expect("Could not set new active node");
+ // TODO Propogate this when this is refactored
+ match self.set_active_node(active_ix) {
+ Ok(_) |
+ Err(TreeError::Focus(
+ FocusError::BlockedByFullscreen(_,_))) => {
+ Ok(())
+ },
+ err => err
+ }.expect("Could not set new active node");
self.tree.set_ancestor_paths_active(active_ix);
self.layout(workspace_ix);
self.validate();
