Firefox and Thunderbird flickering on Wayland

If you get a weird flickering effect when opening the application menu on Firefox or Thunderbird and you’re using Wayland, make sure that you set these environment variables:

MOZ_ENABLE_WAYLAND=1
GDK_BACKEND_WAYLAND=1

Either add them to your .bashrc, .profile or edit the .desktop file in /usr/share/applications/firefox.desktop and change the Exec: line to:

Exec: MOZ_ENABLE_WAYLAND=1 GDK_BACKEND_WAYLAND=1 /usr/lib/firefox/firefox %u

The same for the thunderbird.desktop file

Maybe this helps someone.

Let’s go Wayland