From 28a9439209e26aeaa71bf14b597da9236ec4ca67 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Tue, 14 Nov 2017 18:10:55 +0100 Subject: [PATCH] monitor-manager: Refuse to activate closed laptop panels There's no good reason to allow this and it allows g-c-c to properly show that such a configuration doesn't work. https://bugzilla.gnome.org/show_bug.cgi?id=790336 --- src/backends/meta-monitor-manager.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index 2b22507ba..20c1687fc 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -1573,6 +1573,13 @@ meta_monitor_manager_is_config_applicable (MetaMonitorManager *manager, return FALSE; } + if (meta_monitor_is_laptop_panel (monitor) && + meta_monitor_manager_is_lid_closed (manager)) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Refusing to activate a closed laptop panel"); + return FALSE; + } } }