diff options
author | vaxerski <[email protected]> | 2022-11-18 14:15:19 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-11-18 14:15:19 +0000 |
commit | ba05c43ae3cb680e5d728c5a7457cf6c3d333854 (patch) | |
tree | 3c0b7f80712a2a0a61084f59f3ac2d79ffad1e27 | |
parent | 82fe53004591ef8b9b4f5a4d8381158223373d21 (diff) | |
download | Hyprland-ba05c43ae3cb680e5d728c5a7457cf6c3d333854.tar.gz Hyprland-ba05c43ae3cb680e5d728c5a7457cf6c3d333854.zip |
minor monitor code fixups
-rw-r--r-- | src/helpers/Monitor.cpp | 4 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index fec78317..9e7ec66e 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -89,10 +89,8 @@ void CMonitor::onConnect(bool noRule) { } m_bEnabled = true; - - wlr_output_set_scale(output, monitorRule.scale); + wlr_xcursor_manager_load(g_pCompositor->m_sWLRXCursorMgr, monitorRule.scale); - wlr_output_set_transform(output, WL_OUTPUT_TRANSFORM_NORMAL); // TODO: support other transforms // create it in the arr vecPosition = monitorRule.offset; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 978c58c2..ce1f83f0 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1143,6 +1143,9 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR wlr_output_set_scale(pMonitor->output, pMonitorRule->scale); pMonitor->scale = pMonitorRule->scale; + wlr_output_set_transform(pMonitor->output, pMonitorRule->transform); + pMonitor->transform = pMonitorRule->transform; + // loop over modes and choose an appropriate one. if (pMonitorRule->resolution != Vector2D() && pMonitorRule->resolution != Vector2D(-1,-1) && pMonitorRule->resolution != Vector2D(-1,-2)) { if (!wl_list_empty(&pMonitor->output->modes)) { @@ -1339,9 +1342,6 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR pMonitor->vrrActive = pMonitor->output->pending.adaptive_sync_enabled; // disabled here, will be tested in CConfigManager::ensureVRR() - wlr_output_set_transform(pMonitor->output, pMonitorRule->transform); - pMonitor->transform = pMonitorRule->transform; - pMonitor->vecPixelSize = pMonitor->vecSize; if (pMonitorRule->enable10bit) { @@ -1404,14 +1404,11 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR pMonitor->vecPosition = pMonitorRule->offset; } - wlr_output_enable(pMonitor->output, true); - // update renderer (here because it will call rollback, so we cannot do this before committing) g_pHyprOpenGL->destroyMonitorResources(pMonitor); // updato wlroots wlr_output_layout_add(g_pCompositor->m_sWLROutputLayout, pMonitor->output, (int)pMonitor->vecPosition.x, (int)pMonitor->vecPosition.y); - Events::listener_change(nullptr, nullptr); // updato us arrangeLayersForMonitor(pMonitor->ID); |