-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: There is no way to get a custom WM_CLASS on electron app Windows #33155
Comments
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
I'm also interested in an answer |
I am interested in an answer too |
I have found a solution for this from javascript side. const app = require('electron').app; the above code will set the WM_CLASS to crx_appplication |
It would be nice to have a command line parameter though. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
there you go |
Some other applications use --name, but --class seems to be more common. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
Bump
El jue, 7 de sept de 2023, 8:48 p. m., issue-triage-bot[bot] <
***@***.***> escribió:
… This issue has been automatically marked as stale. *If this issue is
still affecting you, please leave any comment* (for example, "bump"), and
we'll keep it open. If you have any new additional information—in
particular, if this is still reproducible in the latest version of
Electron <https://www.electronjs.org/releases/stable> or in the beta
<https://www.electronjs.org/releases/beta>—please include it with your
comment!
—
Reply to this email directly, view it on GitHub
<#33155 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADT6M7GF76NLF7JWYIL66BTXZJ2PJANCNFSM5QACMGEQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
I can confirm that the suggestion by @Jagadeesh19 works: // In electron main script
electron.app.setName("Your App Name / WM_CLASS"); Thus the issue "There is no way to get a custom WM_CLASS on electron app Windows" can be considered resolved (unless someone needs a WM_CLASS that explicitly differs from the app name). If someone wants to customize the WM_CLASS through command line parameters, then why don't you add/parse a custom command line parameter, which is then used in |
Yes to a "WM_CLASS that explicitly differs from the app name" and in any case without the command line parameter (that already exists in Chromium) you cannot change it on the fly. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue. |
Preflight Checklist
Electron Version
17.1.0
What operating system are you using?
Other Linux
Operating System Version
OpenSuse or any other
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
How can I set a custom WM_CLASS attribute to windows opened with electron? For example, in chromium is possible specifying
--class
argument. When app get a WM_CLASS, KDE and other desktops can correctly assign a icon based on.desktop
files installed.Is there any way to do this in electron? Maybe with command line or with javascript? Something like this could be good
Actual Behavior
I don't see any option related to this. Is there any way to get this?
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: