mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-22 19:28:29 +00:00
config/input: Improve fallback behavior for unset device config values (#3184)
* Fix fallback behavior for unset device config values * Replace overload with default argument for fallback config key * Remove default value for fallback argument in source * Fix typos
This commit is contained in:
@@ -156,9 +156,9 @@ class CConfigManager {
|
||||
void setInt(const std::string&, int);
|
||||
void setString(const std::string&, const std::string&);
|
||||
|
||||
int getDeviceInt(const std::string&, const std::string&, std::optional<bool> touchpad = {});
|
||||
float getDeviceFloat(const std::string&, const std::string&, std::optional<bool> touchpad = {});
|
||||
std::string getDeviceString(const std::string&, const std::string&, std::optional<bool> touchpad = {});
|
||||
int getDeviceInt(const std::string&, const std::string&, const std::string& fallback = "");
|
||||
float getDeviceFloat(const std::string&, const std::string&, const std::string& fallback = "");
|
||||
std::string getDeviceString(const std::string&, const std::string&, const std::string& fallback = "");
|
||||
bool deviceConfigExists(const std::string&);
|
||||
bool shouldBlurLS(const std::string&);
|
||||
|
||||
@@ -255,7 +255,7 @@ class CConfigManager {
|
||||
void applyUserDefinedVars(std::string&, const size_t);
|
||||
void loadConfigLoadVars();
|
||||
SConfigValue getConfigValueSafe(const std::string&);
|
||||
SConfigValue getConfigValueSafeDevice(const std::string&, const std::string&, std::optional<bool> touchpad);
|
||||
SConfigValue getConfigValueSafeDevice(const std::string&, const std::string&, const std::string& fallback = "");
|
||||
void parseLine(std::string&);
|
||||
void configSetValueSafe(const std::string&, const std::string&);
|
||||
void handleDeviceConfig(const std::string&, const std::string&);
|
||||
|
Reference in New Issue
Block a user