kms: change from thread_local approach to wiring scanout node through function calls to detect scanout candidates
This commit is contained in:
parent
012c77ec81
commit
031fdc389a
12 changed files with 140 additions and 68 deletions
|
|
@ -23,6 +23,7 @@ use cosmic::iced::{Color, Task};
|
|||
use cosmic_comp_config::AppearanceConfig;
|
||||
use smithay::{
|
||||
backend::{
|
||||
drm::DrmNode,
|
||||
input::KeyState,
|
||||
renderer::{
|
||||
ImportAll, ImportMem, Renderer,
|
||||
|
|
@ -357,6 +358,7 @@ impl CosmicWindow {
|
|||
location: Point<i32, Physical>,
|
||||
scale: Scale<f64>,
|
||||
alpha: f32,
|
||||
scanout_node: Option<DrmNode>,
|
||||
) -> Vec<C>
|
||||
where
|
||||
R: Renderer + ImportAll + ImportMem,
|
||||
|
|
@ -374,7 +376,11 @@ impl CosmicWindow {
|
|||
self.0.with_program(|p| {
|
||||
p.window
|
||||
.popup_render_elements::<R, CosmicWindowRenderElement<R>>(
|
||||
renderer, window_loc, scale, alpha,
|
||||
renderer,
|
||||
window_loc,
|
||||
scale,
|
||||
alpha,
|
||||
scanout_node,
|
||||
)
|
||||
.into_iter()
|
||||
.map(C::from)
|
||||
|
|
@ -470,6 +476,7 @@ impl CosmicWindow {
|
|||
scale: Scale<f64>,
|
||||
alpha: f32,
|
||||
scanout_override: Option<bool>,
|
||||
scanout_node: Option<DrmNode>,
|
||||
) -> Vec<C>
|
||||
where
|
||||
R: AsGlowRenderer,
|
||||
|
|
@ -553,6 +560,7 @@ impl CosmicWindow {
|
|||
scale,
|
||||
alpha,
|
||||
scanout_override,
|
||||
scanout_node,
|
||||
)
|
||||
});
|
||||
if window_elements.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue