You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you be able to download Electron Fiddle, use it to create a small sample app that allows maintainers to reproduce this issue, and upload it as a GitHub gist from Fiddle?
Hello @Damglador. Thanks for reporting this and helping to make Electron better!
Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.
Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
Now adding the
blocked/need-reproNeeds a test case to reproduce the bug
label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.
@ckerr on KDE Plasma, window menu pops up if I either press Alt+F3 or roght click on the titlebar, in the more options there's 2 bottom options that are usually used to create window rules, but they also show WM Class. Normally it shows two strings, one is identical to the program executable and the right one is WM Class, but on Electron 41 it's always just «electron».
There's also Kwin debugging window that can be shown from Krunner by searching for «Kwin», resourceClass in window properties there seem to refer to WM Class and for Electron 41 is always just «electron», while it should match app name.
Would you be able to check which v41 alpha/beta/nightly version introduced the issue? You can switch Electron versions easily in Electron Fiddle. You can also bisect in Fiddle: View > Toggle Bisect Helper. (You might need to enable nightly versions in the Electron Fiddle settings.)
WM_CLASS is not empty, but it is not derived the same way as before. It now uses the app's executable name by default, not the product name, which is better suited as a default ID especially on Wayland: #49988.
When WM_CLASS matches the XDG App ID, Wayland tends to hide it because WM_CLASS is a legacy X11 concept.
If you want to override the XDG App ID and WM_CLASS you can set desktopName explicitly as before.
@mitchchn using executable isn't a great default as then apps that share executable (using system Electron) get all assigned to «electron» wm_class. If the only way to change the WM_CLASS is through the application code it isn't a great solution either as nobody is going to do that for Obsidian for example, which is currently packaged using system Electron on Arch Linux.
Yep, @mitchchn has it right: 49988 got backported into the 41-x-y branch with #50051, which landed between v41.0.0-beta.7 and v41.0.0-beta.8, matching up with @Damglador's bisect.
@Damglador Thanks for the example. Admittedly I did not consider the "system Electron" approach used for some packages on Arch. But even for this edge case:
Electron should not use the raw productName/name to derive WM_CLASS, since these values are not usually compatible with XDG App IDs on Wayland, which breaks icons and keyboard shortcuts.
Regardless of how the default ID is determined, it should still however be possible (and encouraged) for the developers and/or package maintainers to set the metadata and not rely on accidental defaults.
I am not actually familiar with how Arch packages Electron apps and it would help if someone who is can weigh in.
Another option for the default ID would be to take the productName/name as before but sanitize the value: remove spaces and special chars, lowercase, etc.
Activity
nikwen commentedon Apr 28, 2026
Thanks for reporting!
electron-issue-triage commentedon Apr 28, 2026
Hello @Damglador. Thanks for reporting this and helping to make Electron better!
Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.
Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
Now adding the blocked/need-reproNeeds a test case to reproduce the bug
label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.
ckerr commentedon Apr 29, 2026
@Damglador what method are you using to inspect the app's WM_CLASS and app_id ?
Damglador commentedon Apr 29, 2026
@ckerr on KDE Plasma, window menu pops up if I either press Alt+F3 or roght click on the titlebar, in the more options there's 2 bottom options that are usually used to create window rules, but they also show WM Class. Normally it shows two strings, one is identical to the program executable and the right one is WM Class, but on Electron 41 it's always just «electron».
There's also Kwin debugging window that can be shown from Krunner by searching for «Kwin», resourceClass in window properties there seem to refer to WM Class and for Electron 41 is always just «electron», while it should match app name.
Video_2026-04-29_07-42-34.mp4
Damglador commentedon Apr 29, 2026
I am on Wayland, and it seems like if I force Electron to use Xwayland (with XDG_SESSION_TYPE=x11), the issue doesn't occur.
Attached a gist.
nikwen commentedon Apr 29, 2026
Thanks for the video and for the gist!
Would you be able to check which v41 alpha/beta/nightly version introduced the issue? You can switch Electron versions easily in Electron Fiddle. You can also bisect in Fiddle:
View > Toggle Bisect Helper. (You might need to enable nightly versions in the Electron Fiddle settings.)Damglador commentedon Apr 29, 2026
Last working - v41.0.0-beta.7
Broken in - v41.0.0-beta.8
mitchchn commentedon Apr 29, 2026
WM_CLASS is not empty, but it is not derived the same way as before. It now uses the app's executable name by default, not the product name, which is better suited as a default ID especially on Wayland: #49988.
When WM_CLASS matches the XDG App ID, Wayland tends to hide it because WM_CLASS is a legacy X11 concept.
If you want to override the XDG App ID and WM_CLASS you can set desktopName explicitly as before.
Damglador commentedon Apr 29, 2026
@mitchchn using executable isn't a great default as then apps that share executable (using system Electron) get all assigned to «electron» wm_class. If the only way to change the WM_CLASS is through the application code it isn't a great solution either as nobody is going to do that for Obsidian for example, which is currently packaged using system Electron on Arch Linux.
ckerr commentedon Apr 29, 2026
Yep, @mitchchn has it right: 49988 got backported into the 41-x-y branch with #50051, which landed between v41.0.0-beta.7 and v41.0.0-beta.8, matching up with @Damglador's bisect.
mitchchn commentedon Apr 29, 2026
@Damglador Thanks for the example. Admittedly I did not consider the "system Electron" approach used for some packages on Arch. But even for this edge case:
I am not actually familiar with how Arch packages Electron apps and it would help if someone who is can weigh in.
Another option for the default ID would be to take the productName/name as before but sanitize the value: remove spaces and special chars, lowercase, etc.
Damglador commentedon Apr 29, 2026
Most packages that use system electron just use a script that does
For example Obsidian's launch script is
https://wiki.archlinux.org/title/Electron_package_guidelines
As the package uses pre-built app.asar, it's not feasible for the packager to change
package.jsonused by electron to add desktop name.mitchchn commentedon Apr 30, 2026
@Damglador please take a look at #51424.
nikwen commentedon Apr 30, 2026
@mitchchn Could we document the need to set the
desktopName?I see it documented neither in Electron nor in Electron Forge.
mitchchn commentedon May 1, 2026
Docs: #51426.
In addition to the default value, Obsidian and others can use this (existing!) API even if they are unable to rely on package.json.
Damglador commentedon May 1, 2026
Can confirm that #51424 fixes the issue