hacdias/electron-menubar

When using 2 displays, app is always opened on 1st one.

julienma opened this issue · 1 comments

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.

image
(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`,
});

Update:

Closing this issue.