Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Smithay #173

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ debug = true
lto = "fat"

[patch."https://github.com/Smithay/smithay.git"]
smithay = { git = "https://github.com/smithay//smithay", rev = "1a61e1c13a" }
smithay = { git = "https://github.com/smithay//smithay", rev = "5affbde525" }
4 changes: 4 additions & 0 deletions src/backend/render/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use smithay::{
element::{
surface::{render_elements_from_surface_tree, WaylandSurfaceRenderElement},
texture::{TextureBuffer, TextureRenderElement},
Kind,
},
ImportAll, ImportMem, Renderer,
},
Expand Down Expand Up @@ -170,6 +171,7 @@ where
position.to_physical_precise_round(scale),
scale,
1.0,
Kind::Cursor,
)
}

Expand Down Expand Up @@ -199,6 +201,7 @@ where
location.into().to_physical_precise_round(scale),
scale,
1.0,
Kind::Cursor,
Drakulix marked this conversation as resolved.
Show resolved Hide resolved
)
}

Expand Down Expand Up @@ -344,6 +347,7 @@ where
None,
None,
None,
Kind::Cursor,
),
)];
} else {
Expand Down
12 changes: 10 additions & 2 deletions src/backend/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use smithay::{
element::{
surface::render_elements_from_surface_tree,
utils::{Relocate, RelocateRenderElement},
Element, Id, RenderElement,
Element, Id, Kind, RenderElement,
},
gles::{
element::PixelShaderElement, GlesError, GlesPixelProgram, GlesRenderer, Uniform,
Expand Down Expand Up @@ -234,6 +234,7 @@ impl IndicatorShader {
Uniform::new("thickness", thickness),
Uniform::new("radius", radius as f32),
],
Kind::Unspecified,
);
cache.insert(key.clone(), (settings, elem));
}
Expand Down Expand Up @@ -313,6 +314,7 @@ impl BackdropShader {
),
Uniform::new("radius", radius),
],
Kind::Unspecified,
);
cache.insert(key.clone(), (settings, elem));
}
Expand Down Expand Up @@ -729,12 +731,18 @@ where
location + offset,
scale,
1.0,
Kind::Unspecified,
)
},
));

layer_elements.extend(render_elements_from_surface_tree(
renderer, surface, location, scale, 1.0,
renderer,
surface,
location,
scale,
1.0,
Kind::Unspecified,
));
});

Expand Down
12 changes: 10 additions & 2 deletions src/shell/element/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::time::Duration;
use smithay::{
backend::renderer::{
element::{
self,
surface::{render_elements_from_surface_tree, WaylandSurfaceRenderElement},
utils::select_dmabuf_feedback,
AsRenderElements, RenderElementStates,
Expand Down Expand Up @@ -620,12 +621,19 @@ impl CosmicSurface {
location + offset,
scale,
alpha,
element::Kind::Unspecified,
)
})
.collect();

let window_render_elements =
render_elements_from_surface_tree(renderer, surface, location, scale, alpha);
let window_render_elements = render_elements_from_surface_tree(
renderer,
surface,
location,
scale,
alpha,
element::Kind::Unspecified,
);

(window_render_elements, popup_render_elements)
}
Expand Down
3 changes: 2 additions & 1 deletion src/utils/iced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use smithay::{
renderer::{
element::{
memory::{MemoryRenderBuffer, MemoryRenderBufferRenderElement},
AsRenderElements,
AsRenderElements, Kind,
},
ImportMem, Renderer,
},
Expand Down Expand Up @@ -811,6 +811,7 @@ where
size.to_f64().to_logical(1.0, Transform::Normal),
)),
Some(internal_ref.size),
Kind::Unspecified,
) {
return vec![C::from(buffer)];
}
Expand Down