space: Update custom_elements! example
@@ -940,6 +940,7 @@ macro_rules! custom_elements_internal {
/// ## Example
///
/// ```no_run
+/// # use wayland_server::{Display, DisplayHandle};
/// use smithay::{
/// backend::renderer::{Texture, Renderer, ImportAll},
/// desktop::space::{SurfaceTree, Space, SpaceOutputTuple, RenderElement},
@@ -980,6 +981,7 @@ macro_rules! custom_elements_internal {
/// # impl ImportAll for DummyRenderer {
/// # fn import_buffer(
/// # &mut self,
+/// # dh: &DisplayHandle,
/// # buffer: &wl_buffer::WlBuffer,
/// # surface: Option<&SurfaceData>,
/// # damage: &[Rectangle<i32, Buffer>],
@@ -1082,6 +1084,7 @@ macro_rules! custom_elements_internal {
///#
///# fn draw(
///# &self,
+///# dh: &DisplayHandle,
///# _renderer: &mut R,
///# frame: &mut <R as Renderer>::Frame,
///# scale: impl Into<Scale<f64>>,
@@ -1099,9 +1102,11 @@ macro_rules! custom_elements_internal {
///# let surface_tree: SurfaceTree = unsafe { std::mem::zeroed() };
///# let mut space = Space::new(None);
///# let age = 0;
+///# let display = Display::<()>::new().unwrap();
+///# let dh = display.handle();
///
/// let elements = [CustomElem::from(surface_tree)];
-/// space.render_output(&mut renderer, &output, age, [0.0, 0.0, 0.0, 1.0], &elements);
+/// space.render_output(&dh, &mut renderer, &output, age, [0.0, 0.0, 0.0, 1.0], &elements);
/// ```
#[macro_export]
macro_rules! custom_elements {
