Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect position on multiple monitor #435

Closed
kaiserdj opened this issue Mar 19, 2023 · 1 comment · Fixed by #479
Closed

Incorrect position on multiple monitor #435

kaiserdj opened this issue Mar 19, 2023 · 1 comment · Fixed by #479

Comments

@kaiserdj
Copy link

Description

When I create a new menubar instance, it is generated in the center (between the two screens) but instead later when I open it from the menuTray it opens correctly and even when I click on the menubar to open the menu. Then it is always displayed correctly.

Steps to Reproduce the Problem

anN02BWw6i.mp4

Expected Behaviour

Position of the menubar according to the monitor where the application is.

Actual Behaviour

When opened the menubar is displayed in the center between the two monitors

Specifications

  • Menubar version: 9.3.0
  • Platform: Windows 11
  • Electron version: 11.5.0

Other information

@kaiserdj
Copy link
Author

kaiserdj commented Jun 7, 2023

Workaround while fixing this bug (probably due to Win11)
kaiserdj/Darkorbit-client@bf68ebe

Basically I install the "electron-positioner" library and force the position:

const Positioner = require('electron-positioner');
var positioner = new Positioner(mb.window)
if(mb.getOption("windowPosition") == "trayBottomCenter" && process.platform == "win32") {
     positioner. move('bottomRight');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant