Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tiny-skia = { version = "0.12", default-features = false, features = [
"std",
"simd",
] }
smithay-client-toolkit = { version = "0.20.0", default-features = false }
smithay-client-toolkit = { git = "https://github.com/ids1024/client-toolkit", branch = "dispatch2", default-features = false }

# Draw title text using crossfont `--features crossfont`
crossfont = { version = "0.9.0", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type SkiaResult = Option<()>;
#[derive(Debug)]
pub struct AdwaitaFrame<State> {
/// The base surface used to create the window.
base_surface: WlTyped<WlSurface, SurfaceData>,
base_surface: WlTyped<WlSurface, SurfaceData<()>>,

compositor: Arc<CompositorState>,

Expand Down Expand Up @@ -110,7 +110,7 @@ pub struct AdwaitaFrame<State> {

impl<State> AdwaitaFrame<State>
where
State: Dispatch<WlSurface, SurfaceData> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
State: Dispatch<WlSurface, SurfaceData<()>> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
{
pub fn new(
base_surface: &impl WaylandSurface,
Expand Down Expand Up @@ -378,7 +378,7 @@ where

impl<State> DecorationsFrame for AdwaitaFrame<State>
where
State: Dispatch<WlSurface, SurfaceData> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
State: Dispatch<WlSurface, SurfaceData<()>> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
{
fn update_state(&mut self, state: WindowState) {
let difference = self.state.symmetric_difference(state);
Expand Down
12 changes: 7 additions & 5 deletions src/parts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ pub struct DecorationParts {

impl DecorationParts {
pub fn new<State>(
base_surface: &WlTyped<WlSurface, SurfaceData>,
base_surface: &WlTyped<WlSurface, SurfaceData<()>>,
subcompositor: &SubcompositorState,
queue_handle: &QueueHandle<State>,
) -> Self
where
State: Dispatch<WlSurface, SurfaceData> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
State:
Dispatch<WlSurface, SurfaceData<()>> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
{
let parts = [
Part::new(base_surface, subcompositor, queue_handle),
Expand Down Expand Up @@ -295,7 +296,7 @@ pub struct Rect {

#[derive(Debug)]
pub struct Part {
pub surface: WlTyped<WlSurface, SurfaceData>,
pub surface: WlTyped<WlSurface, SurfaceData<()>>,
pub subsurface: WlTyped<WlSubsurface, SubsurfaceData>,

/// Positioned relative to the main surface.
Expand All @@ -310,12 +311,13 @@ pub struct Part {

impl Part {
fn new<State>(
parent: &WlTyped<WlSurface, SurfaceData>,
parent: &WlTyped<WlSurface, SurfaceData<()>>,
subcompositor: &SubcompositorState,
queue_handle: &QueueHandle<State>,
) -> Part
where
State: Dispatch<WlSurface, SurfaceData> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
State:
Dispatch<WlSurface, SurfaceData<()>> + Dispatch<WlSubsurface, SubsurfaceData> + 'static,
{
let (subsurface, surface) =
subcompositor.create_subsurface(parent.inner().clone(), queue_handle);
Expand Down
Loading