desktop: Add missing cfg directives
This commit is contained in:
parent
58f20fb6c7
commit
fafbf300dc
|
@ -8,7 +8,9 @@ use crate::{
|
||||||
SurfaceAttributes, TraversalAction,
|
SurfaceAttributes, TraversalAction,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use std::{cell::RefCell, collections::HashSet};
|
use std::cell::RefCell;
|
||||||
|
#[cfg(feature = "desktop")]
|
||||||
|
use std::collections::HashSet;
|
||||||
use wayland_server::protocol::{wl_buffer::WlBuffer, wl_surface::WlSurface};
|
use wayland_server::protocol::{wl_buffer::WlBuffer, wl_surface::WlSurface};
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
@ -17,6 +19,7 @@ pub(crate) struct SurfaceState {
|
||||||
pub(crate) buffer_scale: i32,
|
pub(crate) buffer_scale: i32,
|
||||||
pub(crate) buffer: Option<WlBuffer>,
|
pub(crate) buffer: Option<WlBuffer>,
|
||||||
pub(crate) texture: Option<Box<dyn std::any::Any + 'static>>,
|
pub(crate) texture: Option<Box<dyn std::any::Any + 'static>>,
|
||||||
|
#[cfg(feature = "desktop")]
|
||||||
pub(crate) damage_seen: HashSet<crate::desktop::space::SpaceOutputHash>,
|
pub(crate) damage_seen: HashSet<crate::desktop::space::SpaceOutputHash>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +36,7 @@ impl SurfaceState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.texture = None;
|
self.texture = None;
|
||||||
|
#[cfg(feature = "desktop")]
|
||||||
self.damage_seen.clear();
|
self.damage_seen.clear();
|
||||||
}
|
}
|
||||||
Some(BufferAssignment::Removed) => {
|
Some(BufferAssignment::Removed) => {
|
||||||
|
@ -42,6 +46,7 @@ impl SurfaceState {
|
||||||
buffer.release();
|
buffer.release();
|
||||||
};
|
};
|
||||||
self.texture = None;
|
self.texture = None;
|
||||||
|
#[cfg(feature = "desktop")]
|
||||||
self.damage_seen.clear();
|
self.damage_seen.clear();
|
||||||
}
|
}
|
||||||
None => {}
|
None => {}
|
||||||
|
|
|
@ -6,6 +6,7 @@ pub mod signaling;
|
||||||
#[cfg(feature = "x11rb_event_source")]
|
#[cfg(feature = "x11rb_event_source")]
|
||||||
pub mod x11rb;
|
pub mod x11rb;
|
||||||
|
|
||||||
|
#[cfg(feature = "desktop")]
|
||||||
pub(crate) mod ids;
|
pub(crate) mod ids;
|
||||||
pub mod user_data;
|
pub mod user_data;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue