Recently, I decided to move over to a Wayland-based window manager like Hyprland, and I noticed an issue with clicking in various IntelliJ submenus. For example, when the Build pane was open, clicks would intermittently register in the Project pane instead. This was particularly frustrating, as focus issues and misaligned click zones were breaking my workflow.
After some digging, I discovered that JetBrains had released a version that supports running natively under Wayland, rather than relying on the compatibility layer XWayland. Native Wayland support was first introduced in the 2024.2 EAP builds.
To solve the issue, add the following JVM option:
-Dawt.toolkit.name=WLToolkit
There are a few ways to apply this setting in your IDE:
Using idea.vmoptions (Recommended)
- Open the IDE
- Go to Help → Edit Custom VM Options
- Add the VM Option that was mentioned above
⚠️ If the “Edit Custom VM Options” option is not available, IntelliJ might not have created a custom options file yet. In that case, it will prompt you to create one — accept it and proceed.
Using a .desktop file
Copy the .desktop file to the ~/.local/share/applications
folder (your path & name might differ)
cp /var/lib/snapd/desktop/applications/Intellij ~/.local/share/applications
Open the file with your favorite editor and find the line starting with Exec=
. It will look something like this:
Exec=env "/home/youruser/ideaIU-2025.1.1/bin/idea.sh" %f
Then add _JAVA_OPTIONS='-Dawt.toolkit.name=WLToolkit'
to the beginning of that line, it should now look something like this
Exec=env _JAVA_OPTIONS='-Dawt.toolkit.name=WLToolkit' "/home/youruser/ideaIU-2025.1.1/bin/idea.sh" %f
Save the file and restart your application launcher if necessary.