Skip to content

Unexpected initial BrowserWindow position in presence of multiple monitors with different scaleFactors #9560

@JenningsWu

Description

@JenningsWu
  • Electron version: Electron 1.6.8
  • Operating system: Windows 10 Build 15063

Expected behavior

The main display is 3840 x 2160 with 250% scale factor and the external monitor (put on the left of the main one) is 1920 x 1080 with 125% scale factor.

When a new BrowserWindow is created with options {x: -400, y: 0}, it is on the external monitor (scaleFactor = 1.25) so the left-top of the window should be at (-500, 0).

Actual behavior

The left-top of the window is at (-1000, 0).

How to reproduce

Two monitors with the different scale factor.

https://github.com/JenningsWu/electron-quick-start

Simply npm install and then start this electron-quick-start app.

The app window should be on where it is closed. But if it is closed on the external monitor, next time the initial position will be wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions