Fix crashes on wsl-randr if a monitor is disabled

This commit is contained in:
Marc
2024-07-24 20:27:33 +02:00
parent 65ffb8276c
commit ec29c67c5f

View File

@@ -358,6 +358,10 @@ def list_outputs(sway=False, tree=None, silent=False):
'transform': transform,
'scale': scale,
'monitor': None}
#Each monitor only have a single transform this avoid parsing multiple times the same monitor
#Disabled monitors don't have transforms.
# Gdk doesn't report disabled monitor, not filtering them would cause crashes
transform = None
else:
print("'wlr-randr' command not found, terminating")
sys.exit(1)