<NME> render.rs
<BEF> use smithay::{
    backend::renderer::{Frame, ImportAll, Renderer},
    desktop::{
        draw_window,
        space::{RenderElement, RenderError, Space},
    },
    utils::{Logical, Rectangle},
    output::Output,
    utils::{Physical, Rectangle},
};

#[cfg(feature = "debug")]
use crate::drawing::FpsElement;
use crate::{
    drawing::{PointerRenderElement, CLEAR_COLOR},
    shell::FullscreenSurface,
};

smithay::backend::renderer::element::render_elements! {
    pub CustomRenderElements<R> where
        R: ImportAll;
    Pointer=PointerRenderElement<R>,
    Surface=WaylandSurfaceRenderElement,
    #[cfg(feature = "debug")]
    // Note: We would like to borrow this element instead, but that would introduce
    // a feature-dependent lifetime, which introduces a lot more feature bounds
    // as the whole type changes and we can't have an unused lifetime (for when "debug" is disabled)
    // in the declaration.
    Fps=FpsElement<<R as Renderer>::TextureId>,
}

#[allow(clippy::too_many_arguments)]
pub fn render_output<'a, R>(
    output: &Output,
    space: &'a Space<Window>,
    custom_elements: &'a [CustomRenderElements<R>],
    renderer: &mut R,
    damage_tracked_renderer: &mut DamageTrackedRenderer,
    age: usize,
    log: &slog::Logger,
) -> Result<(Option<Vec<Rectangle<i32, Physical>>>, RenderElementStates), DamageTrackedRendererError<R>>
where
    R: Renderer + ImportAll,
    R::TextureId: Clone + 'static,
{
    if let Some(window) = output
        .user_data()
        .get::<FullscreenSurface>()
        .and_then(|f| f.get())
    {
        if let DamageTrackedRendererMode::Auto(renderer_output) = damage_tracked_renderer.mode() {
            assert!(renderer_output == output);
                    )],
                    log,
                )?;
                for elem in elements {
                    let geo = elem.geometry();
                    let location = geo.loc - output_geo.loc;
            damage_tracked_renderer,
            CLEAR_COLOR,
            log.clone(),
        )
    }
}

<MSG> anvil: fix fullscreen window popups

popups are no longer drawn as part of the window.
we have to explicitely draw them for full screen windows.

<DFF> @@ -1,7 +1,7 @@
 use smithay::{
     backend::renderer::{Frame, ImportAll, Renderer},
     desktop::{
-        draw_window,
+        draw_window, draw_window_popups,
         space::{RenderElement, RenderError, Space},
     },
     utils::{Logical, Rectangle},
@@ -53,6 +53,18 @@ where
                     )],
                     log,
                 )?;
+                draw_window_popups(
+                    renderer,
+                    frame,
+                    &window,
+                    scale,
+                    (0, 0),
+                    &[Rectangle::from_loc_and_size(
+                        (0, 0),
+                        mode.size.to_f64().to_logical(scale).to_i32_round(),
+                    )],
+                    log,
+                )?;
                 for elem in elements {
                     let geo = elem.geometry();
                     let location = geo.loc - output_geo.loc;

anvil: fix fullscreen window popups