tiling: Animate tree changes
This commit is contained in:
parent
ea1b976076
commit
331b884f1e
23 changed files with 1641 additions and 395 deletions
|
|
@ -17,6 +17,7 @@ use crate::{
|
|||
xwayland::XWaylandState,
|
||||
};
|
||||
|
||||
use calloop::LoopHandle;
|
||||
use indexmap::IndexSet;
|
||||
use smithay::{
|
||||
backend::renderer::{
|
||||
|
|
@ -85,6 +86,14 @@ impl Workspace {
|
|||
self.tiling_layer.refresh();
|
||||
}
|
||||
|
||||
pub fn animations_going(&self) -> bool {
|
||||
self.tiling_layer.animations_going()
|
||||
}
|
||||
|
||||
pub fn update_animations(&mut self, handle: &LoopHandle<'static, crate::state::Data>) {
|
||||
self.tiling_layer.update_animation_state(handle)
|
||||
}
|
||||
|
||||
pub fn commit(&mut self, surface: &WlSurface) {
|
||||
if let Some(mapped) = self.element_for_wl_surface(surface) {
|
||||
mapped
|
||||
|
|
@ -484,6 +493,7 @@ impl Workspace {
|
|||
renderer,
|
||||
loc.to_physical_precise_round(output_scale),
|
||||
Scale::from(output_scale),
|
||||
1.0,
|
||||
)
|
||||
}),
|
||||
);
|
||||
|
|
@ -499,6 +509,7 @@ impl Workspace {
|
|||
(or.geometry().loc - output.geometry().loc)
|
||||
.to_physical_precise_round(output_scale),
|
||||
Scale::from(output_scale),
|
||||
1.0,
|
||||
)
|
||||
}),
|
||||
);
|
||||
|
|
@ -507,7 +518,11 @@ impl Workspace {
|
|||
render_elements.extend(AsRenderElements::<R>::render_elements::<
|
||||
WorkspaceRenderElement<R>,
|
||||
>(
|
||||
fullscreen, renderer, (0, 0).into(), output_scale.into()
|
||||
fullscreen,
|
||||
renderer,
|
||||
(0, 0).into(),
|
||||
output_scale.into(),
|
||||
1.0,
|
||||
));
|
||||
|
||||
if let Some(xwm) = xwm_state.and_then(|state| state.xwm.as_mut()) {
|
||||
|
|
@ -551,6 +566,7 @@ impl Workspace {
|
|||
renderer,
|
||||
loc.to_physical_precise_round(output_scale),
|
||||
Scale::from(output_scale),
|
||||
1.0,
|
||||
)
|
||||
}),
|
||||
);
|
||||
|
|
@ -570,6 +586,7 @@ impl Workspace {
|
|||
(or.geometry().loc - output.geometry().loc)
|
||||
.to_physical_precise_round(output_scale),
|
||||
Scale::from(output_scale),
|
||||
1.0,
|
||||
)
|
||||
}),
|
||||
);
|
||||
|
|
@ -620,6 +637,7 @@ impl Workspace {
|
|||
renderer,
|
||||
loc.to_physical_precise_round(output_scale),
|
||||
Scale::from(output_scale),
|
||||
1.0,
|
||||
)
|
||||
}),
|
||||
);
|
||||
|
|
@ -715,6 +733,13 @@ where
|
|||
WorkspaceRenderElement::Window(elem) => elem.opaque_regions(scale),
|
||||
}
|
||||
}
|
||||
|
||||
fn alpha(&self) -> f32 {
|
||||
match self {
|
||||
WorkspaceRenderElement::Wayland(elem) => elem.alpha(),
|
||||
WorkspaceRenderElement::Window(elem) => elem.alpha(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<R> RenderElement<R> for WorkspaceRenderElement<R>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue