Commit 6c8b103a authored by Jonas Ådahl's avatar Jonas Ådahl

DisplayConfig: Add "is_builtin" monitor property

Add a per-monitor property allowing the application to determine
whether the monitor is builtin or not, e.g. a laptop panel.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
parent 95d01177
......@@ -1417,6 +1417,7 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
GVariantBuilder modes_builder;
GVariantBuilder monitor_properties_builder;
GList *k;
gboolean is_builtin;
current_mode = meta_monitor_get_current_mode (monitor);
preferred_mode = meta_monitor_get_preferred_mode (monitor);
......@@ -1458,6 +1459,11 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
g_variant_new_boolean (is_underscanning));
}
is_builtin = meta_monitor_is_laptop_panel (monitor);
g_variant_builder_add (&monitor_properties_builder, "{sv}",
"is_builtin",
g_variant_new_boolean (is_builtin));
g_variant_builder_add (&monitors_builder, MONITOR_FORMAT,
monitor_spec->connector,
monitor_spec->vendor,
......
......@@ -331,6 +331,9 @@
- "max_screen_size" (ii): the maximum size a screen may have
(absence of this means unlimited screen
size)
- "is_builtin" (b): whether the monitor is built in, e.g. a
laptop panel (absence of this means it is
not built in)
Possible mode flags:
1 : preferred mode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment