monitor-manager: Make scale floats in D-Bus API
We don't want to limit ourself to whole integers for configuration, as that'd mean it wouldn't be able to provide configurations for fractional scalings. Thus, change scales to be referred to as floats instead of ints. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
6b2a111428
commit
3b46345db4
@ -1177,14 +1177,14 @@ meta_monitor_manager_legacy_handle_apply_configuration (MetaDBusDisplayConfig *
|
||||
#define META_DISPLAY_CONFIG_MODE_FLAGS_PREFERRED (1 << 0)
|
||||
#define META_DISPLAY_CONFIG_MODE_FLAGS_CURRENT (1 << 1)
|
||||
|
||||
#define MODE_FORMAT "(iidiu)"
|
||||
#define MODE_FORMAT "(iiddu)"
|
||||
#define MODES_FORMAT "a" MODE_FORMAT
|
||||
#define MONITOR_SPEC_FORMAT "(ssss)"
|
||||
#define MONITOR_FORMAT "(" MONITOR_SPEC_FORMAT MODES_FORMAT "a{sv})"
|
||||
#define MONITORS_FORMAT "a" MONITOR_FORMAT
|
||||
|
||||
#define LOGICAL_MONITOR_MONITORS_FORMAT "a" MONITOR_SPEC_FORMAT
|
||||
#define LOGICAL_MONITOR_FORMAT "(iiii" LOGICAL_MONITOR_MONITORS_FORMAT "iba{sv})"
|
||||
#define LOGICAL_MONITOR_FORMAT "(iiii" LOGICAL_MONITOR_MONITORS_FORMAT "dba{sv})"
|
||||
#define LOGICAL_MONITORS_FORMAT "a" LOGICAL_MONITOR_FORMAT
|
||||
|
||||
static gboolean
|
||||
@ -1237,7 +1237,7 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
|
||||
monitor_mode_spec->width,
|
||||
monitor_mode_spec->height,
|
||||
monitor_mode_spec->refresh_rate,
|
||||
preferred_scale,
|
||||
(double) preferred_scale,
|
||||
flags);
|
||||
}
|
||||
|
||||
@ -1289,7 +1289,7 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
|
||||
logical_monitor->rect.width,
|
||||
logical_monitor->rect.height,
|
||||
&logical_monitor_monitors_builder,
|
||||
logical_monitor->scale,
|
||||
(double) logical_monitor->scale,
|
||||
logical_monitor->is_primary,
|
||||
NULL);
|
||||
}
|
||||
|
@ -308,7 +308,7 @@
|
||||
* i width: width in physical pixels
|
||||
* i height: height in physical pixels
|
||||
* d refresh rate: refresh rate
|
||||
* i preferred scale: scale preferred as per calculations
|
||||
* d preferred scale: scale preferred as per calculations
|
||||
* u flags: mode flags (see below)
|
||||
* a{sv} properties: optional properties, including:
|
||||
- "width_mm" (i): physical width of monitor in millimeters
|
||||
@ -333,7 +333,7 @@
|
||||
* vendor: vendor name
|
||||
* product: product name
|
||||
* serial: product serial
|
||||
* i scale: scale
|
||||
* d scale: scale
|
||||
* b primary: true if this is the primary logical monitor
|
||||
* a{sv} properties: possibly other properties
|
||||
|
||||
@ -343,8 +343,8 @@
|
||||
-->
|
||||
<method name="GetCurrentState">
|
||||
<arg name="serial" direction="out" type="u" />
|
||||
<arg name="monitors" direction="out" type="a((ssss)a(iidiu)a{sv})" />
|
||||
<arg name="logical_monitors" direction="out" type="a(iiiia(ssss)iba{sv})" />
|
||||
<arg name="monitors" direction="out" type="a((ssss)a(iiddu)a{sv})" />
|
||||
<arg name="logical_monitors" direction="out" type="a(iiiia(ssss)dba{sv})" />
|
||||
<arg name="max_screen_size" direction="out" type="(ii)" />
|
||||
</method>
|
||||
</interface>
|
||||
|
Loading…
Reference in New Issue
Block a user