DisplayConfig: Add 'supports-changing-layout-mode' property

This property may be used by a client to determine whether it is
allowed to change the layout mode.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2017-04-06 14:00:06 +08:00
parent 1caa7f7627
commit bdcb395b33
2 changed files with 8 additions and 2 deletions

View File

@ -1531,11 +1531,14 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
g_variant_new_boolean (FALSE));
}
if (capabilities & META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE)
{
g_variant_builder_add (&properties_builder, "{sv}",
"layout-mode",
g_variant_new_uint32 (manager->layout_mode));
if (capabilities & META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE)
{
g_variant_builder_add (&properties_builder, "{sv}",
"supports-changing-layout-mode",
g_variant_new_boolean (TRUE));
}
if (meta_monitor_manager_get_max_screen_size (manager,

View File

@ -398,6 +398,9 @@
using the logical monitor scale.
* 2 : physical - the dimension of a logical monitor is derived from
the monitor modes associated with it.
* "supports-changing-layout-mode" (b): True if the layout mode can be
changed. Absence of this means the
layout mode cannot be changed.
-->
<method name="GetCurrentState">
<arg name="serial" direction="out" type="u" />