summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-08-02 13:03:54 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-08-09 14:34:15 +0200
commitf499c03429f0b6514d304289506e67e1da87efa7 (patch)
treebc53f7b8ee83b64f46a2d0e333b913a950a93955
parent338c96325b24b30b960073e8e2bfe14d15a581f9 (diff)
compositor-drm: Ignore disconnected connectors widthfix
- 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)
-rw-r--r--compositor/compositor-drm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/compositor/compositor-drm.c b/compositor/compositor-drm.c
index b6560bd..d097323 100644
--- a/compositor/compositor-drm.c
+++ b/compositor/compositor-drm.c
@@ -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);
}