hacdias / electron-menubar

Easy way to create an electron menubar application.
MIT License
39 stars 1 forks source link

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

Closed julienma closed 6 years ago

julienma commented 6 years ago

Hey,

Context

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`,
});
julienma commented 6 years ago

Update:

Closing this issue.