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
|
it's enabled and second value whether it's
|
||||||
hardware locked (and so can't be changed
|
hardware locked (and so can't be changed
|
||||||
via gsettings)
|
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:
|
Possible mode flags:
|
||||||
1 : preferred mode
|
1 : preferred mode
|
||||||
|
@ -2073,6 +2073,7 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
|
|||||||
MetaMonitorMode *current_mode;
|
MetaMonitorMode *current_mode;
|
||||||
MetaMonitorMode *preferred_mode;
|
MetaMonitorMode *preferred_mode;
|
||||||
MetaPrivacyScreenState privacy_screen_state;
|
MetaPrivacyScreenState privacy_screen_state;
|
||||||
|
int min_refresh_rate;
|
||||||
GVariantBuilder modes_builder;
|
GVariantBuilder modes_builder;
|
||||||
GVariantBuilder monitor_properties_builder;
|
GVariantBuilder monitor_properties_builder;
|
||||||
GList *k;
|
GList *k;
|
||||||
@ -2190,6 +2191,14 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
|
|||||||
"privacy-screen-state", state);
|
"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,
|
g_variant_builder_add (&monitors_builder, MONITOR_FORMAT,
|
||||||
monitor_spec->connector,
|
monitor_spec->connector,
|
||||||
monitor_spec->vendor,
|
monitor_spec->vendor,
|
||||||
|
Loading…
Reference in New Issue
Block a user