renderer: apply scale to wlr after checks

ref #4225
This commit is contained in:
Vaxry 2023-12-22 23:00:36 +01:00
parent c416880cf9
commit 79ef29d6e0

View file

@ -1718,14 +1718,13 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
pMonitor->customDrmMode = {}; pMonitor->customDrmMode = {};
if (pMonitorRule->scale > 0.1) { if (pMonitorRule->scale > 0.1) {
wlr_output_set_scale(pMonitor->output, pMonitorRule->scale);
pMonitor->scale = pMonitorRule->scale; pMonitor->scale = pMonitorRule->scale;
} else { } else {
const auto DEFAULTSCALE = pMonitor->getDefaultScale(); const auto DEFAULTSCALE = pMonitor->getDefaultScale();
wlr_output_set_scale(pMonitor->output, DEFAULTSCALE);
pMonitor->scale = DEFAULTSCALE; pMonitor->scale = DEFAULTSCALE;
} }
wlr_output_set_scale(pMonitor->output, pMonitor->scale);
pMonitor->setScale = pMonitor->scale; pMonitor->setScale = pMonitor->scale;
wlr_output_set_transform(pMonitor->output, pMonitorRule->transform); wlr_output_set_transform(pMonitor->output, pMonitorRule->transform);
@ -1980,6 +1979,8 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
} }
} }
wlr_output_set_scale(pMonitor->output, pMonitor->scale);
// clang-format off // clang-format off
static const std::array<std::vector<std::pair<std::string, uint32_t>>, 2> formats{ static const std::array<std::vector<std::pair<std::string, uint32_t>>, 2> formats{
std::vector<std::pair<std::string, uint32_t>>{ /* 10-bit */ std::vector<std::pair<std::string, uint32_t>>{ /* 10-bit */