mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
libratbag: don't allow disabling active profile
This commit is contained in:
@@ -797,6 +797,9 @@ ratbag_profile_set_enabled(struct ratbag_profile *profile, bool enabled)
|
||||
if (!ratbag_profile_has_capability(profile, RATBAG_PROFILE_CAP_DISABLE))
|
||||
return RATBAG_ERROR_CAPABILITY;
|
||||
|
||||
if (profile->is_active && !enabled)
|
||||
return RATBAG_ERROR_VALUE;
|
||||
|
||||
profile->is_enabled = enabled;
|
||||
profile->dirty = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user