diff options
author | Vladimir Panteleev <git@thecybershadow.net> | 2018-12-20 11:28:51 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2019-08-12 10:47:46 -0700 |
commit | 829ed54d89bb37c9e2f8050fe72bd4ecf7b5395a (patch) | |
tree | ce607b4b30ffd8ebd14e7596bf18e82545c3235a | |
parent | 9e5fa7c8c26f78e121ffad0d7a745a674c4a1849 (diff) |
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.
Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r-- | xrandr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3642,7 +3642,7 @@ main (int argc, char **argv) } get_screen(True); - get_monitors(True); + get_monitors(False); get_crtcs(); get_outputs(); |