Commit 9eaee356 authored by Benjamin Franzke's avatar Benjamin Franzke 😀 Committed by Kristian Høgsberg
Browse files

compositor-drm: Ignore disconnected connectors width

- Fixes segfault, if first enumerated connector is not connected.
- Corrects x-offset where e.g. the 2. of 3 connectors is not connected.
  (where width of 1. output would have taken twice as
   offset for output at 3. connector)
parent 3651bd54
......@@ -516,13 +516,15 @@ create_outputs(struct drm_compositor *ec, int option_connector)
if (connector->connection == DRM_MODE_CONNECTED &&
(option_connector == 0 ||
connector->connector_id == option_connector))
connector->connector_id == option_connector)) {
if (create_output_for_connector(ec, resources,
connector, x, y) < 0)
return -1;
x += container_of(ec->base.output_list.prev, struct wlsc_output,
link)->current->width;
x += container_of(ec->base.output_list.prev,
struct wlsc_output,
link)->current->width;
}
drmModeFreeConnector(connector);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment