Open fablevi opened 1 month ago
This is the code:
const { app, Tray, nativeImage, BrowserWindow, screen, Menu } = require('electron/main') let tray let window app.whenReady().then(() => { const icon = nativeImage.createFromPath('./src/icons/icon.png'); tray = new Tray(icon); tray.on('click', function (event) { console.log("Asd") }) tray.setToolTip('This is my application.') const contextMenu = Menu.buildFromTemplate([ { label: 'Item1', type: 'radio' }, { label: 'Item2', type: 'radio' }, { label: 'Item3', type: 'radio' }, { label: 'Item4', type: 'radio' } ]) tray.setContextMenu(contextMenu) })
The click works, because the contextMenu opens, but the console log and anything on the click wont trigger. This works on Gnome 46
This is the code:
The click works, because the contextMenu opens, but the console log and anything on the click wont trigger. This works on Gnome 46