From bdcb395b3343864d3be8a2447e394250baf41b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 6 Apr 2017 14:00:06 +0800 Subject: [PATCH] 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 --- src/backends/meta-monitor-manager.c | 7 +++++-- src/org.gnome.Mutter.DisplayConfig.xml | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index 48c99a0e7..5104d731a 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -1531,11 +1531,14 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton, g_variant_new_boolean (FALSE)); } + 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}", - "layout-mode", - g_variant_new_uint32 (manager->layout_mode)); + "supports-changing-layout-mode", + g_variant_new_boolean (TRUE)); } if (meta_monitor_manager_get_max_screen_size (manager, diff --git a/src/org.gnome.Mutter.DisplayConfig.xml b/src/org.gnome.Mutter.DisplayConfig.xml index 5b544381f..30d2eade8 100644 --- a/src/org.gnome.Mutter.DisplayConfig.xml +++ b/src/org.gnome.Mutter.DisplayConfig.xml @@ -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. -->