I’m building an app launcher in rust for wayland on linux. I really would like to create a background blur effect similar to the one on MacOS’ Spotlight. I have tried GTK4’s builtin filter option but that only blur the element itself.
I have also considered using a BlurNode but after hours of trying to get it to work on a GtkBox I gave up. Finally, I also considered trying to take advantage of the compositor (e.g. Wayland) but that isn’t possible because I’m using gtk4-layer-shell to make my app display above all other and ignore window rules. One final idea I had was using GLSL shaders but similarly to the BlurNode It didn’t seem like it was possible to apply them to a GtkBox or a GtkWindow.
The only examples of Gtk Blur I could find at all were on recorded on Gnome.
https://www.youtube.com/watch?v=Gqo8nJKjcis
If there is no official way to do it I had a very bad and janky idea to maybe get the pixels that are behind the window draw them onto a GDK Surface and then apply a blur effect to that although that seems a bit odd and I don’t know if that could even work.
Anything that could point in the right direction would be appreciated.
Carl Marino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.