Revert "monitor-manager-xrandr: Ignore outputs without modes"

This reverts commit 86a913d37a. It
introduced a memory leak, so we'll go for a cleaner approach.

https://bugzilla.gnome.org/show_bug.cgi?id=756796
This commit is contained in:
Rui Matos 2015-10-27 15:07:05 +01:00
parent bff75b64be
commit 57ae203aab

View File

@ -808,15 +808,6 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
{ {
GBytes *edid; GBytes *edid;
/* Get this first so that if there are no valid modes we
can immediately skip to the next output without having
to unwind all the assignments below. */
output_get_modes (manager, meta_output, output);
if (meta_output->n_modes == 0)
continue;
meta_output->preferred_mode = meta_output->modes[0];
meta_output->winsys_id = resources->outputs[i]; meta_output->winsys_id = resources->outputs[i];
meta_output->name = g_strdup (output->name); meta_output->name = g_strdup (output->name);
@ -833,6 +824,8 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
meta_output->connector_type = output_get_connector_type (manager_xrandr, meta_output); meta_output->connector_type = output_get_connector_type (manager_xrandr, meta_output);
output_get_tile_info (manager_xrandr, meta_output); output_get_tile_info (manager_xrandr, meta_output);
output_get_modes (manager, meta_output, output);
meta_output->preferred_mode = meta_output->modes[0];
meta_output->n_possible_crtcs = output->ncrtc; meta_output->n_possible_crtcs = output->ncrtc;
meta_output->possible_crtcs = g_new0 (MetaCRTC *, meta_output->n_possible_crtcs); meta_output->possible_crtcs = g_new0 (MetaCRTC *, meta_output->n_possible_crtcs);