mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
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
This commit is contained in:
parent
95d0117784
commit
6c8b103a7b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user