mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
libratbag: don't allow setting disabled profile as active
This commit is contained in:
@@ -895,6 +895,9 @@ ratbag_profile_set_active(struct ratbag_profile *profile)
|
||||
struct ratbag_device *device = profile->device;
|
||||
struct ratbag_profile *p;
|
||||
|
||||
if (!profile->is_enabled)
|
||||
return RATBAG_ERROR_VALUE;
|
||||
|
||||
if (device->num_profiles == 1)
|
||||
return RATBAG_SUCCESS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user