glzr-io / glazewm

GlazeWM is a tiling window manager for Windows inspired by i3wm.
GNU General Public License v3.0
5.51k stars 159 forks source link

monitor number swapped #612

Closed 7sCELL closed 1 month ago

7sCELL commented 4 months ago

i have 2 monitors and the numbers keep switching

2 workspaces

1 on main monitor

2 on the second

my workspaces:

workspaces:

the only thing i find to fix is to reboot

ParasiteDelta commented 4 months ago

Yep, this is an infamous issue. This is because, under the hood somehow, Windows re-initializes your displays when waking from sleep or cycling power to the monitors. So, to quote LGUG2Z, 1 and 2 become 4 and 3. So yes, Windows has a way of identifying monitors which does not correlate to anything displayed by your system settings, no, you cannot just directly access what the system settings say, and yes, they are actively working on it for the V3 rewrite.

Man, why is Windows such a pain to develop for? It's awful.

AndreiArion commented 4 months ago

As a workaround what worked for me at least once (needs more testing :) ) is to close glazeWM and delete all the window desktops (keep only one). Then when I restarted glazeWM it created the workspaces on the right monitors and with the right application to worspace/monitor.

Not ideal but still better than rebooting and might be automatised.

888iee commented 3 months ago

I have the same issue in both my remote workspace and my personal pc. I never close environment in my workplace. So that's a hassle. I think it would be the easiest fix if we can use the display id (e.g. //LGHDDISPLAY1) instead of the display number we get from windows.

lars-berger commented 1 month ago

Crashes and inconsistencies on display setting changes, system standby, and monitor disconnections should now be fixed in v3 🎉 Latest release