When using 2 displays, app is always opened on 1st one.
julienma opened this issue · 1 comments
julienma commented
Hey,
Context
- OS: macOS 10.13.3 (I couldn't test with Windows)
- macbook pro with an external display plugged in
Issue
When clicking on the menubar icon, the main app window is always displayed on the 1st (main) display, even when clicking the tray icon on the 2nd display.
(Left: external (main) display — Right: macbook display. I'm clicking on the tray icon on the right display, the window opens on the left one.)
Expected
The app window should open on the display where the icon has been clicked.
More info
This bug happens on my own Electron app.
It also happens with the latest IPFS Desktop release.
However, when using "classic" Menubar, without any specific option, this bug does not happen anymore.
E.g. positioning works fine with Menubar:
const menubar = require('menubar');
// ...
const mb = menubar({
index: `file://${__dirname}/app.html`,
icon: `${__dirname}/icon.png`,
});
While it does not with electron-menubar:
import { Menubar, Positioner } from 'electron-menubar';
// ...
const mb = new Menubar({
index: `file://${__dirname}/app.html`,
icon: `${__dirname}/icon.png`,
});
julienma commented
Update:
- I couldn't get to adapt
electron-menubar
to make it work with multiple displays. Instead, it was easier to fixmenubar
to correctly behave on Windows, while still behaving perfectly with multiple displays. - I'm now using this menubar fork: https://github.com/BaguetteEngineering/menubar, based off Sidney's commit: sidneys/menubar@233bcb8.
Closing this issue.