From 50348a3ddbb6bc3367300c9bba2ff682e4a356e3 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 18 Aug 2024 20:19:13 +0200 Subject: [PATCH 02/20] renderer: pass custom modelines to aq ref #7390 --- src/render/Renderer.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index b363c287..c2ecbbf3 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1994,17 +1994,9 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR if (pMonitor->output->getBackend()->type() != Aquamarine::eBackendType::AQ_BACKEND_DRM) { Debug::log(ERR, "Tried to set custom modeline on non-DRM output"); fail = true; - } else { - // FIXME: - // auto* mode = wlr_drm_connector_add_mode(pMonitor->output, &RULE->drmMode); - // if (mode) { - // wlr_output_state_set_mode(pMonitor->state.wlr(), mode); - // pMonitor->customDrmMode = RULE->drmMode; - // } else { - // Debug::log(ERR, "wlr_drm_connector_add_mode failed"); - // fail = true; - // } - } + } else + pMonitor->output->state->setCustomMode(makeShared( + Aquamarine::SOutputMode{.pixelSize = {RULE->drmMode.hdisplay, RULE->drmMode.vdisplay}, .refreshRate = RULE->drmMode.vrefresh, .modeInfo = RULE->drmMode})); } else pMonitor->output->state->setCustomMode(makeShared(Aquamarine::SOutputMode{.pixelSize = RULE->resolution, .refreshRate = WLRREFRESHRATE})); -- 2.45.2