shell: Preserve snapped state through fullscreen/minimize round-trips
This commit is contained in:
parent
744e0da6f9
commit
4565514e76
3 changed files with 29 additions and 1 deletions
|
|
@ -1641,6 +1641,14 @@ impl FloatingLayout {
|
|||
elements
|
||||
}
|
||||
|
||||
pub fn snapped_geometry(&self, corners: &TiledCorners) -> Rectangle<i32, Local> {
|
||||
let output = self.space.outputs().next().unwrap().clone();
|
||||
let layers = layer_map_for_output(&output);
|
||||
let non_exclusive = layers.non_exclusive_zone();
|
||||
std::mem::drop(layers);
|
||||
corners.relative_geometry(non_exclusive, self.gaps())
|
||||
}
|
||||
|
||||
fn gaps(&self) -> (i32, i32) {
|
||||
let g = self.theme.cosmic().gaps;
|
||||
(g.0 as i32, g.1 as i32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue