Drop the switchable-resolution device capability

This capability is superfluous. If we have more than one resolution, we can
switch between them because ... well, why have more than one then?

Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2019-02-20 12:16:15 +10:00
parent e4d4a7905a
commit d24ea1e662
9 changed files with 1 additions and 20 deletions

View File

@@ -247,7 +247,6 @@ ratbagd_device_get_capabilities(sd_bus *bus,
enum ratbag_device_capability caps[] = {
RATBAG_DEVICE_CAP_QUERY_CONFIGURATION,
RATBAG_DEVICE_CAP_RESOLUTION,
RATBAG_DEVICE_CAP_RESOLUTION_SWITCHABLE,
RATBAG_DEVICE_CAP_PROFILE,
RATBAG_DEVICE_CAP_PROFILE_SWITCHABLE,
RATBAG_DEVICE_CAP_BUTTON,

View File

@@ -426,7 +426,6 @@ hidpp10drv_read_profile(struct ratbag_profile *profile)
xres = 0xffff;
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION_SWITCHABLE);
ratbag_profile_for_each_resolution(profile, res) {
unsigned int dpis[hidpp10->dpi_count];

View File

@@ -1097,7 +1097,6 @@ hidpp20drv_init_feature(struct ratbag_device *device, uint16_t feature)
if (rc < 0)
return 0; /* this is not a hard failure */
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION_SWITCHABLE);
drv_data->capabilities |= HIDPP_CAP_SWITCHABLE_RESOLUTION_2201;
break;
}

View File

@@ -499,7 +499,6 @@ logitech_g300_probe(struct ratbag_device *device)
logitech_g300_read_profile(profile);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION_SWITCHABLE);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_PROFILE);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_PROFILE_SWITCHABLE);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_BUTTON);

View File

@@ -496,7 +496,6 @@ logitech_g600_probe(struct ratbag_device *device)
logitech_g600_read_profile(profile);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION_SWITCHABLE);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_PROFILE);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_PROFILE_SWITCHABLE);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_BUTTON);

View File

@@ -104,16 +104,6 @@ enum ratbag_device_capability {
*/
RATBAG_DEVICE_CAP_RESOLUTION = 100,
/**
* The device can change resolution, either software-controlled or
* by a hardware button.
*
* FIXME: what about devices that only have hw buttons? can we
* query that, even if we can't switch it ourselves? Maybe better to
* have a separate cap for that then.
*/
RATBAG_DEVICE_CAP_RESOLUTION_SWITCHABLE,
/**
* The device provides read and/or write access to one or more
* profiles.

View File

@@ -728,10 +728,8 @@ ratbag_device_init_profiles(struct ratbag_device *device,
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_BUTTON_KEY);
}
if (num_resolutions > 1) {
if (num_resolutions > 1)
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION);
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_RESOLUTION_SWITCHABLE);
}
if (num_leds > 0)
ratbag_device_set_capability(device, RATBAG_DEVICE_CAP_LED);

View File

@@ -258,7 +258,6 @@ def print_device(d, level):
caps = {RatbagdDevice.CAP_RESOLUTION: "resolution",
RatbagdDevice.CAP_PROFILE: "profile",
RatbagdDevice.CAP_BUTTON: "button",
RatbagdDevice.CAP_RESOLUTION_SWITCHABLE: "switchable-resolution",
RatbagdDevice.CAP_PROFILE_SWITCHABLE: "switchable-profile",
RatbagdDevice.CAP_BUTTON_KEY: "button-keys",
RatbagdDevice.CAP_BUTTON_MACROS: "button-macros",

View File

@@ -320,7 +320,6 @@ class RatbagdDevice(_RatbagdDBus):
CAP_NONE = 0
CAP_QUERY_CONFIGURATION = 1
CAP_RESOLUTION = 100
CAP_RESOLUTION_SWITCHABLE = 101
CAP_PROFILE = 200
CAP_PROFILE_SWITCHABLE = 201
CAP_BUTTON = 300