mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
ratbagd: do not warn when converting invalid special action
Clients e.g. ratbagctl ask for all properties, so this getter gets called often even if the button is not a special action. We do not want to send the value for an invalid special action as that is negative 1. Converting to unknown is good enough here so let's just remove the error logging and convert in silence.
This commit is contained in:
committed by
Peter Hutterer
parent
447931d779
commit
b738136154
@@ -132,11 +132,8 @@ static int ratbagd_button_get_special(sd_bus *bus,
|
||||
enum ratbag_button_action_special special;
|
||||
|
||||
special = ratbag_button_get_special(button->lib_button);
|
||||
if (special == RATBAG_BUTTON_ACTION_SPECIAL_INVALID) {
|
||||
log_error("%s: changing button special action from INVALID to UNKNOWN\n",
|
||||
ratbagd_device_get_sysname(button->device));
|
||||
if (special == RATBAG_BUTTON_ACTION_SPECIAL_INVALID)
|
||||
special = RATBAG_BUTTON_ACTION_SPECIAL_UNKNOWN;
|
||||
}
|
||||
|
||||
verify_unsigned_int(special);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user