summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Panteleev <git@thecybershadow.net>2018-12-20 11:28:51 +0000
committerMatt Turner <mattst88@gmail.com>2019-08-12 10:47:46 -0700
commit829ed54d89bb37c9e2f8050fe72bd4ecf7b5395a (patch)
treece607b4b30ffd8ebd14e7596bf18e82545c3235a
parent9e5fa7c8c26f78e121ffad0d7a745a674c4a1849 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xrandr.c b/xrandr.c
index 0eff3c1..8d27a88 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -3642,7 +3642,7 @@ main (int argc, char **argv)
}
get_screen(True);
- get_monitors(True);
+ get_monitors(False);
get_crtcs();
get_outputs();