kms: change from thread_local approach to wiring scanout node through function calls to detect scanout candidates

This commit is contained in:
Ericky Dos Santos 2026-07-01 11:05:56 -04:00 • committed by Jacob Kauffmann
parent 012c77ec81
commit 031fdc389a
12 changed files with 140 additions and 68 deletions

View file

@ -8,6 +8,7 @@ use cosmic_comp_config::AppearanceConfig;
use id_tree::NodeId;
use smithay::{
backend::{
drm::DrmNode,
input::KeyState,
renderer::{
element::{
@ -589,6 +590,7 @@ impl CosmicMapped {
location: smithay::utils::Point<i32, smithay::utils::Physical>,
scale: smithay::utils::Scale<f64>,
alpha: f32,
scanout_node: Option<DrmNode>,
) -> Vec<C>
where
R: AsGlowRenderer,
@ -599,11 +601,19 @@ impl CosmicMapped {
match &self.element {
CosmicMappedInternal::Stack(s) => s
.popup_render_elements::<R, CosmicMappedRenderElement<R>>(
renderer, location, scale, alpha,
renderer,
location,
scale,
alpha,
scanout_node,
),
CosmicMappedInternal::Window(w) => w
.popup_render_elements::<R, CosmicMappedRenderElement<R>>(
renderer, location, scale, alpha,
renderer,
location,
scale,
alpha,
scanout_node,
),
_ => unreachable!(),
}
@ -664,6 +674,7 @@ impl CosmicMapped {
scale: smithay::utils::Scale<f64>,
alpha: f32,
scanout_override: Option<bool>,
scanout_node: Option<DrmNode>,
) -> Vec<C>
where
R: AsGlowRenderer,
@ -854,6 +865,7 @@ impl CosmicMapped {
scale,
alpha,
scanout_override,
scanout_node,
),
CosmicMappedInternal::Window(w) => w
.render_elements::<R, CosmicMappedRenderElement<R>>(
@ -863,6 +875,7 @@ impl CosmicMapped {
scale,
alpha,
scanout_override,
scanout_node,
),
_ => unreachable!(),
});