Skip to content

xrandr: Fix deleting inactive monitors

The following commands did not behave correctly:

xrandr --setmonitor empty auto none
xrandr --delmonitor empty

The second command failed with "No monitor named 'empty'". This
occurred because get_monitors was invoked with its get_active argument
set to False, which caused it to not retrieve inactive monitors. Thus,
inactive monitors could not be deleted.

Fix this bug by invoking get_monitors (and, thus, XRRGetMonitors) with
get_active = False, thus enabling deletion of disabled monitors.
Edited by Vladimir Panteleev

Merge request reports