We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8c942d commit 3f0e411Copy full SHA for 3f0e411
1 file changed
api/application/menu.js
@@ -2,6 +2,7 @@
2
import { MenuItemEvent } from '../internal/events.js'
3
import { Deferred } from '../async.js'
4
import ipc from '../ipc.js'
5
+import os from '../os.js'
6
7
let contextMenuDeferred = null
8
@@ -450,6 +451,7 @@ export default container
450
451
* @ignore
452
*/
453
export async function setMenu (options, type) {
454
+ options = { ...options }
455
const menu = options.value
456
457
// validate the menu
@@ -537,6 +539,10 @@ export async function setMenu (options, type) {
537
539
: 'application.setSystemMenu'
538
540
)
541
542
+ if (os.platform() === 'linux') {
543
+ options.value = encodeURIComponent(options.value)
544
+ }
545
+
546
return await ipc.send(command, options)
547
}
548
0 commit comments