Is this information somehow encoded in the renderer process?
Have you try this ?
require('electron').remote.getCurrentWindow().id
@abdihaikal Cheers, I missed that from the docs :)
Since Electron now has more things than 2 years ago, you can just go over the event of your IPC call and request the BrowserWindow that triggered the call:
event.sender.getOwnerBrowserWindow()
has that. It returns a BrowserWindow Object with all the properties that it could have such: minimize(), close(), etc....
Most helpful comment
Have you try this ?
require('electron').remote.getCurrentWindow().id