monitor-manager/kms: Use connector id to find old output

The zero-initialized winsys id was incorrectly used as the key to find
the old output to base active/primary state from, which would never
succeed unless the winsys id happened to be 0. Fix this by using the
winsys id that will be used, i.e. the connector id.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2017-03-24 17:26:26 +08:00
parent 88f2441330
commit 27a4f9f862

View File

@ -1090,7 +1090,7 @@ init_outputs (MetaMonitorManager *manager,
MetaOutput *old_output;
old_output = find_output_by_id (old_outputs, n_old_outputs,
output->winsys_id);
connector->connector_id);
init_output (output, manager, connector, old_output);
n_actual_outputs++;
}