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
This commit is contained in:
Rui Matos 2017-11-14 18:10:55 +01:00
parent cf4b5efdd1
commit 28a9439209

View File

@ -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;
}
}
}