|
|
2c033f |
From f7b298e717f6a891867ad3b2fb105e59d41aae12 Mon Sep 17 00:00:00 2001
|
|
|
2c033f |
From: Rui Matos <tiagomatos@gmail.com>
|
|
|
2c033f |
Date: Fri, 3 Jul 2015 18:01:14 +0200
|
|
|
2c033f |
Subject: [PATCH] monitor-manager: Fix the max potential number of logical
|
|
|
2c033f |
monitors
|
|
|
2c033f |
|
|
|
2c033f |
The max potential number of logical monitors (i.e. MetaMonitorInfos)
|
|
|
2c033f |
is the number of CRTCs, not the number of outputs.
|
|
|
2c033f |
|
|
|
2c033f |
In cases where we have more enabled CRTCs than connected outputs we
|
|
|
2c033f |
would end up appending more MetaMonitorInfos to the GArray than the
|
|
|
2c033f |
size it was initialized with which means the array would get
|
|
|
2c033f |
re-allocated rendering invalid some MetaCRTC->logical_monitor pointers
|
|
|
2c033f |
assigned previously and thus ending in crashes later on.
|
|
|
2c033f |
|
|
|
2c033f |
https://bugzilla.gnome.org/show_bug.cgi?id=751638
|
|
|
2c033f |
---
|
|
|
2c033f |
src/backends/meta-monitor-manager.c | 2 +-
|
|
|
2c033f |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
2c033f |
|
|
|
2c033f |
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
|
|
|
2c033f |
index 0cb2fc7..95d81de 100644
|
|
|
2c033f |
--- a/src/backends/meta-monitor-manager.c
|
|
|
2c033f |
+++ b/src/backends/meta-monitor-manager.c
|
|
|
2c033f |
@@ -104,7 +104,7 @@ make_logical_config (MetaMonitorManager *manager)
|
|
|
2c033f |
unsigned int i, j;
|
|
|
2c033f |
|
|
|
2c033f |
monitor_infos = g_array_sized_new (FALSE, TRUE, sizeof (MetaMonitorInfo),
|
|
|
2c033f |
- manager->n_outputs);
|
|
|
2c033f |
+ manager->n_crtcs);
|
|
|
2c033f |
|
|
|
2c033f |
/* Walk the list of MetaCRTCs, and build a MetaMonitorInfo
|
|
|
2c033f |
for each of them, unless they reference a rectangle that
|
|
|
2c033f |
--
|
|
|
2c033f |
2.5.0
|
|
|
2c033f |
|