floating: Allow dragging windows into stacks

This commit is contained in:
Victoria Brekenfeld 2024-01-08 21:37:06 +00:00 committed by Victoria Brekenfeld
parent e9c5266509
commit 9ca5edc836
4 changed files with 97 additions and 42 deletions

View file

@ -1510,6 +1510,25 @@ impl Shell {
(self.resize_mode.clone(), self.resize_indicator.clone())
}
pub fn stacking_indicator(
&self,
output: &Output,
layer: ManagedLayer,
) -> Option<Rectangle<i32, Local>> {
match layer {
ManagedLayer::Sticky => self
.workspaces
.sets
.get(output)
.and_then(|set| set.sticky_layer.stacking_indicator()),
ManagedLayer::Floating => self
.active_space(output)
.floating_layer
.stacking_indicator(),
ManagedLayer::Tiling => self.active_space(output).tiling_layer.stacking_indicator(),
}
}
pub fn refresh(&mut self) {
#[cfg(feature = "debug")]
puffin::profile_function!();