[mutter/wayland] monitor-config: prevent assert that at least one output is connected
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] monitor-config: prevent assert that at least one output is connected
- Date: Wed, 9 Apr 2014 20:04:04 +0000 (UTC)
commit e215f3f5eb379ec95b3bae06c32043d94292a4aa
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Oct 15 20:12:05 2013 +0200
monitor-config: prevent assert that at least one output is connected
Apparently some connector technologies don't distinguish between
on and off, and there might be valid use cases for running without
any connected monitor.
In that case, just avoid any configuration at all.
https://bugzilla.gnome.org/show_bug.cgi?id=709009
src/backends/meta-monitor-config.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor-config.c b/src/backends/meta-monitor-config.c
index 8150c09..f7ddce5 100644
--- a/src/backends/meta-monitor-config.c
+++ b/src/backends/meta-monitor-config.c
@@ -840,6 +840,9 @@ meta_monitor_config_get_stored (MetaMonitorConfig *self,
MetaConfiguration key;
MetaConfiguration *stored;
+ if (n_outputs == 0)
+ return NULL;
+
make_config_key (&key, outputs, n_outputs, -1);
stored = g_hash_table_lookup (self->configs, &key);
@@ -1247,6 +1250,12 @@ meta_monitor_config_make_default (MetaMonitorConfig *self,
outputs = meta_monitor_manager_get_outputs (manager, &n_outputs);
meta_monitor_manager_get_screen_limits (manager, &max_width, &max_height);
+ if (n_outputs == 0)
+ {
+ meta_verbose ("No output connected, not applying configuration\n");
+ return;
+ }
+
default_config = make_default_config (self, outputs, n_outputs, max_width, max_height);
if (default_config != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]