From d62030b506f6b686ffe1e750ea9d3a855beec1f0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 13 Sep 2015 11:40:37 +0100 Subject: [PATCH] Only use the current information when setting modes Before we change the state (e.g. adding a mode or applying one to an output), we query the screen resources for the right identifiers. This should only use the current information rather than force a reprobe on all hardware - not only can that reprobe be very slow (e.g. EDID timeouts on the order of seconds), but it may perturb the setup that the user is trying to configure. Signed-off-by: Chris Wilson --- xrandr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xrandr.c b/xrandr.c index 181c76e..dcfdde0 100644 --- a/xrandr.c +++ b/xrandr.c @@ -3325,7 +3325,7 @@ main (int argc, char **argv) { umode_t *m; - get_screen (current); + get_screen (True); get_crtcs(); get_outputs(); @@ -3374,7 +3374,7 @@ main (int argc, char **argv) { output_t *output; - get_screen (current); + get_screen (True); get_crtcs(); get_outputs(); @@ -3465,7 +3465,7 @@ main (int argc, char **argv) if (!has_1_4) fatal ("--setprovideroutputsource requires RandR 1.4\n"); - get_screen (current); + get_screen (True); get_providers (); provider = find_provider (&provider_name); @@ -3480,7 +3480,7 @@ main (int argc, char **argv) if (!has_1_4) fatal ("--setprovideroffloadsink requires RandR 1.4\n"); - get_screen (current); + get_screen (True); get_providers (); provider = find_provider (&provider_name); @@ -3490,7 +3490,7 @@ main (int argc, char **argv) } if (setit_1_2) { - get_screen (current); + get_screen (True); get_crtcs (); get_outputs (); set_positions (); @@ -3589,7 +3589,7 @@ main (int argc, char **argv) exit(0); } - get_screen(current); + get_screen(True); get_monitors(True); get_crtcs(); get_outputs(); -- 2.32.0.93.g670b81a890