fix: Add Element::kind method to CosmicElement
The default implementation always returned `Kind::Unspecified`. Instead, we should pass this method through to the wrapped element. This fixes the use of cursor planes. Now trace logs show Smithay assigning an element to the cursor plane, and tools like `drm_info` show the cursor plane with an `FB_ID` attached.
This commit is contained in:
parent
17ddc7ce24
commit
916b7729a5
1 changed files with 13 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ use smithay::{
|
|||
element::{
|
||||
surface::WaylandSurfaceRenderElement,
|
||||
utils::{Relocate, RelocateRenderElement},
|
||||
Element, Id, RenderElement, UnderlyingStorage,
|
||||
Element, Id, Kind, RenderElement, UnderlyingStorage,
|
||||
},
|
||||
glow::{GlowFrame, GlowRenderer},
|
||||
utils::{CommitCounter, DamageSet},
|
||||
|
|
@ -151,6 +151,18 @@ where
|
|||
CosmicElement::Egui(elem) => elem.alpha(),
|
||||
}
|
||||
}
|
||||
|
||||
fn kind(&self) -> Kind {
|
||||
match self {
|
||||
CosmicElement::Workspace(elem) => elem.kind(),
|
||||
CosmicElement::Cursor(elem) => elem.kind(),
|
||||
CosmicElement::Dnd(elem) => elem.kind(),
|
||||
CosmicElement::MoveGrab(elem) => elem.kind(),
|
||||
CosmicElement::AdditionalDamage(elem) => elem.kind(),
|
||||
#[cfg(feature = "debug")]
|
||||
CosmicElement::Egui(elem) => elem.kind(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl RenderElement<GlowRenderer> for CosmicElement<GlowRenderer> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue