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

[Customize Windows notifications placement] Display numbers change on screen sleep - need different selection method than current display enumuration #1356

Open
ShizCalev opened this issue Dec 17, 2024 · 0 comments
Labels
mod-bug Something isn't working with a mod

Comments

@ShizCalev
Copy link

ShizCalev commented Dec 17, 2024

@m417z
I have a 3 monitor setup, which my main screen being a TV. Whenever my TV goes to sleep / turns off its display with the screensaver, Windows sees it as having disconnected. Once it's turned back on, Windows assigns it a different display number.

In other words, when I boot Windows, my primary display/TV starts as Display 1, when my display goes to sleep, it shifts to Display 2, or even sometimes Display 3 randomly, and this happens pretty much every time my screen goes to sleep. EnumDisplayMonitors() does not work in this use case (and I'd assume if you use screen mirroring to other devices, such as a tablet a assume a similar issue would pop up as those also appear as psuedo-screens that change the other monitor numbers.) This is a longstanding Windows quirk when it comes to TV's.

Looking into a potential solution, perhaps utilizing the EDD_GET_DEVICE_INTERFACE_NAME flag to retrieve monitor GUID's and use those for selecting the desired monitor is a safer/more consistent method?

Some articles that may help:
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumdisplaydevicesa
https://learn.microsoft.com/en-us/windows-hardware/drivers/install/guid-devinterface-monitor
https://stackoverflow.com/questions/50330106/get-unique-identifier-for-windows-monitors
https://stackoverflow.com/questions/7486485/get-display-name-that-matches-that-found-in-display-settings
https://stackoverflow.com/questions/36206202/how-can-i-uniquely-identify-a-monitor

@ShizCalev ShizCalev added the mod-bug Something isn't working with a mod label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod-bug Something isn't working with a mod
Projects
None yet
Development

No branches or pull requests

1 participant