[mutter] monitor-manager: Refuse to activate closed laptop panels
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-manager: Refuse to activate closed laptop panels
- Date: Thu, 23 Nov 2017 15:15:59 +0000 (UTC)
commit 28a9439209e26aeaa71bf14b597da9236ec4ca67
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Nov 14 18:10:55 2017 +0100
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 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 2b22507..20c1687 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;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]