diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index fb5c7b02..477c3986 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -146,17 +146,18 @@ void CConfigManager::setDefaultVars() { ((CGradientValueData*)configValues["group:groupbar:col.locked_active"].data.get())->reset(0x66ff5500); ((CGradientValueData*)configValues["group:groupbar:col.locked_inactive"].data.get())->reset(0x66775500); - configValues["debug:int"].intValue = 0; - configValues["debug:log_damage"].intValue = 0; - configValues["debug:overlay"].intValue = 0; - configValues["debug:damage_blink"].intValue = 0; - configValues["debug:disable_logs"].intValue = 1; - configValues["debug:disable_time"].intValue = 1; - 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["debug:watchdog_timeout"].intValue = 5; + configValues["debug:int"].intValue = 0; + configValues["debug:log_damage"].intValue = 0; + configValues["debug:overlay"].intValue = 0; + configValues["debug:damage_blink"].intValue = 0; + configValues["debug:disable_logs"].intValue = 1; + configValues["debug:disable_time"].intValue = 1; + 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["debug:watchdog_timeout"].intValue = 5; + configValues["debug:disable_scale_checks"].intValue = 0; configValues["decoration:rounding"].intValue = 0; configValues["decoration:blur:enabled"].intValue = 1; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 69f9f4b4..d944a3ec 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1679,6 +1679,8 @@ DAMAGETRACKINGMODES CHyprRenderer::damageTrackingModeFromStr(const std::string& bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorRule, bool force) { + static auto* const PDISABLESCALECHECKS = &g_pConfigManager->getConfigValuePtr("debug:disable_scale_checks")->intValue; + Debug::log(LOG, "Applying monitor rule for {}", pMonitor->szName); pMonitor->activeMonitorRule = *pMonitorRule; @@ -1944,7 +1946,7 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR pMonitor->vecPixelSize = pMonitor->vecSize; Vector2D logicalSize = pMonitor->vecPixelSize / pMonitor->scale; - if (logicalSize.x != std::round(logicalSize.x) || logicalSize.y != std::round(logicalSize.y)) { + if (!*PDISABLESCALECHECKS && (logicalSize.x != std::round(logicalSize.x) || logicalSize.y != std::round(logicalSize.y))) { // invalid scale, will produce fractional pixels. // find the nearest valid.