Layer shell prevents desktop interaction

Hi!
I’m currently trying to create a layer shell which should be used as a surface for my “wallpaper” (I’d like to render my own stuff on it).

But somehow after creating the layer shell I’m not able to interact with the desktop anymore. Like right-clicking with the mouse isn’t possible anymore or left clicking the icons on the desktop.

Here’s my code how I’m creating the layer shell:

            let layer_surface = self.layer_shell.create_layer_surface(
                qh,
                wl_surface,
                Layer::Background,
                Some(format!("{} background", vibe_daemon::APP_NAME)),
                Some(&output),
            );

        layer_surface.set_exclusive_zone(-69); // nice! (arbitrary chosen :P hehe)
        layer_surface.set_anchor(Anchor::BOTTOM);
        layer_surface.set_size(size.width, size.height);
        layer_surface.set_keyboard_interactivity(KeyboardInteractivity::None);
        layer_surface.commit();

Does anyone know how I can fix that? Am I choosing a wrong parameter here?

That also means you will need to implement context menu like right clicks.

You might be able to ignore mouse clicks events for your wl_surface and let the events go to the surface below, if the z-order is correct, have a mouse interaction transparent surface but that I am not sure this is possible.

Or what you can implement otherwise is a Plasma wallpaper plugin, there are examples here:

Or GitHub - luisbocanegra/plasma-smart-video-wallpaper-reborn: Plasma 6 wallpaper plugin to play videos on your Desktop/Lock Screen.
But it will be complicated to do it in Rust.

1 Like

I’d like to avoid this because I’d like to have my app being “compositor-independent”.

I’ve already set my z value to -69 as you can see from the code above but my surface is somehow still “over” the desktop.