diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-08 21:40:41 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-08 21:40:41 +0200 |
| commit | 7347a72ba674b099a073c17a74877b6e93a8e1e3 (patch) | |
| tree | eb43369765d28d5605ab4b790a1bb5455028e3d9 /src/config/ConfigManager.cpp | |
| parent | 037bad4986f3f5077bac91cdcdf20bd94d4fa38e (diff) | |
Added HyprError for showing config errors
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index e32709ba..4eb617b9 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -310,7 +310,7 @@ void CConfigManager::loadConfigLoadVars() { Debug::log(ERR, "Error reading line from config. Line:"); Debug::log(NONE, "%s", line.c_str()); - parseError = "Config error at line " + std::to_string(linenum) + ": Line parsing error."; + parseError += "Config error at line " + std::to_string(linenum) + ": Line parsing error."; } if (parseError != "" && parseError.find("Config error at line") != 0) { @@ -331,6 +331,12 @@ void CConfigManager::loadConfigLoadVars() { // Calculate the mod mask for main_mod configValues["general:main_mod_internal"].intValue = g_pKeybindManager->stringToModMask(configValues["general:main_mod"].strValue); + + // parseError will be displayed next frame + if (parseError != "") + g_pHyprError->queueCreate(parseError + "\nHyprland may not work correctly.", CColor(255, 50, 50, 255)); + else + g_pHyprError->destroy(); } void CConfigManager::tick() { |
