feat(debug): add debug:suppress_errors to suppress errors. (#3032)

This commit is contained in:
memchr 2023-08-20 16:17:49 +00:00 committed by GitHub
parent b79dfcceb4
commit 09cc96c0d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,6 +125,7 @@ void CConfigManager::setDefaultVars() {
configValues["debug:enable_stdout_logs"].intValue = 0;
configValues["debug:damage_tracking"].intValue = DAMAGE_TRACKING_FULL;
configValues["debug:manual_crash"].intValue = 0;
configValues["debug:suppress_errors"].intValue = 0;
configValues["decoration:rounding"].intValue = 0;
configValues["decoration:blur:enabled"].intValue = 1;
@ -1566,7 +1567,7 @@ void CConfigManager::loadConfigLoadVars() {
g_pHyprOpenGL->m_bReloadScreenShader = true;
// parseError will be displayed next frame
if (parseError != "")
if (parseError != "" && !configValues["debug:suppress_errors"].intValue)
g_pHyprError->queueCreate(parseError + "\nHyprland may not work correctly.", CColor(1.0, 50.0 / 255.0, 50.0 / 255.0, 1.0));
else if (configValues["autogenerated"].intValue == 1)
g_pHyprError->queueCreate("Warning: You're using an autogenerated config! (config file: " + mainConfigPath + " )\nSUPER+Q -> kitty\nSUPER+M -> exit Hyprland",