Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
As per #9560 where previous issues regarding this were collapsed into.
If you have one monitor with non-100% scaling and one monitor with 100% scaling both
A proposed workaround is #9708 but that simply reverts the addition of the feature instead of fixing the underlying cause.
All future issues regarding DPI scaling and window positioning / sizing should be merged into this one.
@MarshallOfSound Well, the #10659 problem I raised, although clearly related with DPI, isn't specific to "per-monitor" DPI, and you don't even need multiple monitors to reproduce it. So it doesn't fit this new issue as currently described, and the way to solve both these issues most certainly involves different fixes in the code.
I'm afraid merging all the DPI-related bugs into this one will just make everybody forget about the sub-issues, as they are now closed. If you want to merge all these issues into one, the description of the main issue should probably be made much more general than it currently is.
Just my 2 cents.
@dimdimdimdim As far as I am aware, the underlying reason is the same (adding the flag that makes Electron executable per-monitor DPI aware). Not saying we should merge all high-DPI issues into this one, but everyone who is reporting individual things like "positioning doesn't work", "sizing doesn't work" and "things appear off screen" should all get merged into this one issue that keeps track of root-cause and progress made on that.
…1.8.1 There is a severe, still unresolved issue with window positioning and dimensions that comes with the new versions of Electron. More information about it can be found here: electron/electron#10862. The fixes include: * Activating the `resize` callbacks only when the DPI has actually changed * Usage of `setBounds` instead of `setSize` and `setPosition` in order to simultaneously set the dimensions and the coordinates of a `BrowserWindow` * Using the original dimensions of every `BrowserWindow` and relying on a subsequent resize after the heightChangeListener has provided the actual height of the window
* email@example.com * Update distro * Update electron.d.ts to 2.0.0-beta.1 * Disable asar as it causes a native crash * Adopt Module._resolveLookupPaths ASAR patch * electron 2.x - restore inspector URL in extension host * electron 2.x - adopt context menu callback for onHide * electron 2.x - remove workaround for electron/electron#10442 * electron 2.x - update node.d.ts * electron 2.x - update node.d.ts to 8.9.x * electron 2.x - keep node.d.ts changes to a minimum * electron 2.x - remove workaround for electron/electron#10862 * electron 2.x - bump to 2.0.0-beta2 * bump to 2.0.0-beta.3 * Context menu: selecting "Rename" does not put focs into rename box (fix #45601) * quality "exploration" for easier testing * empty commit * push a workaround for #45700 * Certain themes show UI artifacts over activity bar icons (fixes #45700) * better fix for #45700 * bump to 2.0.0-beta.4 * another fix to prevent flickering for #45700 * avoid remote access in index.js * bump distro commit * electron 2.x - do not use --debug anymore * bump electron to 2.0.0-beta.5 * electron 2.x - add libgtk-3-dev as build dependency for Linux 64 * electron 2.x - workaround freeze on linux on startup * bump local storage telemetry key * electron 2.x - do a one time backup of local storage * enable ELECTRON_ENABLE_LOGGING on macOS at least * 2.0.0-beta.6 * Fix ctrl+shift+e not focusing explorer on Linux * distro - use GH electron builds for now
A multi-screen setup with different scale factors still causes issues as of firstname.lastname@example.org on Windows 10
Monitor setup (2) is the main display
First case: both displays have the same scale factor --> everything is okay
Second case: external display has a different scale factor -->
My use case: I've implemented desktop sharing via WebRTC and then I'm highlighting the display shared by the user (via a native window) based on
Any suggestions are really appreciated.
See #9708 ?
Note that screen.getAllDisplays() is a wrapper around:
@CapOM thanks for the info. So this is apparently a chromium issue. I couldn't tell what's going wrong exactly but I tried playing with Windows API
In the "Second case" the second monitor returns:
if we convert that to an "Electron rect":