[mutter] DisplayConfig: Add 'legacy-ui-scaling-factor' property
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] DisplayConfig: Add 'legacy-ui-scaling-factor' property
- Date: Thu, 12 Oct 2017 09:44:19 +0000 (UTC)
commit fad5657edaa4734bff2b8e5d5cd4da1bec89e167
Author: Jonas Ådahl <jadahl gmail com>
Date: Wed Oct 11 17:59:04 2017 +0800
DisplayConfig: Add 'legacy-ui-scaling-factor' property
We have this value in mutter; lets share it so that for example
gnome-settings-daemon doesn't have to calculate it itself.
https://bugzilla.gnome.org/show_bug.cgi?id=788820
src/backends/meta-monitor-manager.c | 7 +++++++
src/org.gnome.Mutter.DisplayConfig.xml | 4 ++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 1ba007c..441a9a0 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -1261,12 +1261,14 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
GDBusMethodInvocation *invocation)
{
MetaMonitorManager *manager = META_MONITOR_MANAGER (skeleton);
+ MetaSettings *settings = meta_backend_get_settings (manager->backend);
GVariantBuilder monitors_builder;
GVariantBuilder logical_monitors_builder;
GVariantBuilder properties_builder;
GList *l;
int i;
MetaMonitorManagerCapability capabilities;
+ int ui_scaling_factor;
int max_screen_width, max_screen_height;
g_variant_builder_init (&monitors_builder,
@@ -1444,6 +1446,11 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
g_variant_new_boolean (TRUE));
}
+ ui_scaling_factor = meta_settings_get_ui_scaling_factor (settings);
+ g_variant_builder_add (&properties_builder, "{sv}",
+ "legacy-ui-scaling-factor",
+ g_variant_new_int32 (ui_scaling_factor));
+
if (meta_monitor_manager_get_max_screen_size (manager,
&max_screen_width,
&max_screen_height))
diff --git a/src/org.gnome.Mutter.DisplayConfig.xml b/src/org.gnome.Mutter.DisplayConfig.xml
index aab2e0f..fe8e022 100644
--- a/src/org.gnome.Mutter.DisplayConfig.xml
+++ b/src/org.gnome.Mutter.DisplayConfig.xml
@@ -394,6 +394,10 @@
always use the same scale. Absence of
this means logical monitor scales can
differ.
+ * "legacy-ui-scaling-factor" (i): The legacy scaling factor traditionally
+ used to scale X11 clients (commonly
+ communicated via the
+ Gdk/WindowScalingFactor XSetting entry).
-->
<method name="GetCurrentState">
<arg name="serial" direction="out" type="u" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]