[gnome-flashback] monitor-manager: refuse to activate closed laptop panels
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] monitor-manager: refuse to activate closed laptop panels
- Date: Tue, 28 Nov 2017 22:45:42 +0000 (UTC)
commit 3e32db575c2cdb195278ff7134aef04227860516
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
backends/gf-monitor-manager.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/backends/gf-monitor-manager.c b/backends/gf-monitor-manager.c
index ee6ce55..cdc7e05 100644
--- a/backends/gf-monitor-manager.c
+++ b/backends/gf-monitor-manager.c
@@ -254,6 +254,13 @@ gf_monitor_manager_is_config_applicable (GfMonitorManager *manager,
return FALSE;
}
+ if (gf_monitor_is_laptop_panel (monitor) &&
+ gf_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]