mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
monitor-manger: Expose the minimum refresh rate of monitors
This exposes the minimum refresh rate of monitors through D-Bus. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3576>
This commit is contained in:
parent
a53c02bba5
commit
8df0beae08
@ -359,6 +359,9 @@
|
||||
it's enabled and second value whether it's
|
||||
hardware locked (and so can't be changed
|
||||
via gsettings)
|
||||
- "min-refresh-rate" (i): minimum refresh rate of monitor when
|
||||
Variable Refresh Rate is active (absence
|
||||
of this means unknown)
|
||||
|
||||
Possible mode flags:
|
||||
1 : preferred mode
|
||||
|
@ -2073,6 +2073,7 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
|
||||
MetaMonitorMode *current_mode;
|
||||
MetaMonitorMode *preferred_mode;
|
||||
MetaPrivacyScreenState privacy_screen_state;
|
||||
int min_refresh_rate;
|
||||
GVariantBuilder modes_builder;
|
||||
GVariantBuilder monitor_properties_builder;
|
||||
GList *k;
|
||||
@ -2190,6 +2191,14 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
|
||||
"privacy-screen-state", state);
|
||||
}
|
||||
|
||||
if (meta_monitor_get_min_refresh_rate (monitor,
|
||||
&min_refresh_rate))
|
||||
{
|
||||
g_variant_builder_add (&monitor_properties_builder, "{sv}",
|
||||
"min-refresh-rate",
|
||||
g_variant_new_int32 (min_refresh_rate));
|
||||
}
|
||||
|
||||
g_variant_builder_add (&monitors_builder, MONITOR_FORMAT,
|
||||
monitor_spec->connector,
|
||||
monitor_spec->vendor,
|
||||
|
Loading…
Reference in New Issue
Block a user