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
Windows: display-removed event not working #3075
Comments
I can confirm a similar problem that is probably related. In my case, not only is the event not working, but the array returned by getAllDisplays() still contains the old entry after a display is removed. Seems likely that the two symptoms are related. |
I have same issue as @delvedor and @ervwalter on windows, 0.29.2 and 0.34.1 |
Also, the reason this is important to me is that when you remote desktop into a windows machine that normally has multiple monitors, the displays change to a new virtual display (and then they switch back to the physical displays when you log in at the physical machine later). During that remote desktop session, the display information returned by the screen module is wrong. So it's not just an issue when you actually physically remove displays (which I would assume is a fairly rare occurrence). It's much more common in enterprise environments for people to be remoting into their desktop machine. |
I can also confirm that only display-added event is fired on Windows (Windows 10 Pro Insider Preview build 10576 at least). Both display-removed and display-metrics-changed are never emitted (I've tested by plugging in/out monitors and changing resolution). Tested with 0.34.2 Electron build |
Confirmed on windows 7, electron 0.29.2 |
Confirming this issue for windows 8.1 and windows 10. Tested on 0.36.3 and 0.34.2. |
The same on Ubuntu 14.04 , electron 0.36.9. |
Will this issue be adressed in the near future? No offense, but it was reported six month ago, and I currently fight screen rotation issues on a Windows 10 Tablet using Electron v0.37.4 … |
Looks like the problem is that the ID is not persistent, the monitor is not found in the vector.
|
I think that also |
This issue/bug is very strange. setInterval(() => {
console.log(screen.getAllDisplays())
}, 1000) And you try to change the monitor's resolution, you will see that the AllDisplays array will not change. |
My PR should fix that too |
Fix #3075 by not caching the displays (id is not persistent on Windows)
These events still aren't fired on OSX Sierra, current electron version. Request to reopen. |
The problem still exists in the electron 2.0.3 on ubuntu 16 |
This problem still exists on 16.1.0 |
This problem still exists on 24.5.1,Monitor hot plug does not trigger |
Hi all, I'm trying to use the display-removed event in my electron app, but while under OSX 10.10 all works correctly, under Windows 7 the event is not detected/emitted.
This is my code:
The event display-added works correctly.
I'm using Electron 0.33.7.
The text was updated successfully, but these errors were encountered: