aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-27 10:27:06 +0200
committervaxerski <[email protected]>2022-05-27 10:27:06 +0200
commitd8c5e53c0803eb118080657734160bf3ab5127d2 (patch)
treef5e6a082c8b3b97177d242f05ee70fab05c5d035
parent8145c552de762bbdb8ddd63b386f4b5a0709bd6c (diff)
downloadHyprland-d8c5e53c0803eb118080657734160bf3ab5127d2.tar.gz
Hyprland-d8c5e53c0803eb118080657734160bf3ab5127d2.zip
Fix dynamic monitor offset changes0.1.0-beta
-rw-r--r--src/render/Renderer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 3f40ffa8..982f7277 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -548,7 +548,7 @@ void CHyprRenderer::applyMonitorRule(SMonitor* pMonitor, SMonitorRule* pMonitorR
Debug::log(LOG, "Applying monitor rule for %s", pMonitor->szName.c_str());
// Check if the rule isn't already applied
- if (!force && DELTALESSTHAN(pMonitor->vecPixelSize.x, pMonitorRule->resolution.x, 1) && DELTALESSTHAN(pMonitor->vecPixelSize.y, pMonitorRule->resolution.y, 1) && DELTALESSTHAN(pMonitor->refreshRate, pMonitorRule->refreshRate, 1) && pMonitor->scale == pMonitorRule->scale) {
+ if (!force && DELTALESSTHAN(pMonitor->vecPixelSize.x, pMonitorRule->resolution.x, 1) && DELTALESSTHAN(pMonitor->vecPixelSize.y, pMonitorRule->resolution.y, 1) && DELTALESSTHAN(pMonitor->refreshRate, pMonitorRule->refreshRate, 1) && pMonitor->scale == pMonitorRule->scale && DELTALESSTHAN(pMonitor->vecPosition.x, pMonitorRule->offset.x, 1) && DELTALESSTHAN(pMonitor->vecPosition.y, pMonitorRule->offset.y, 1)) {
Debug::log(LOG, "Not applying a new rule to %s because it's already applied!", pMonitor->szName.c_str());
return;
}
@@ -556,6 +556,8 @@ void CHyprRenderer::applyMonitorRule(SMonitor* pMonitor, SMonitorRule* pMonitorR
wlr_output_set_scale(pMonitor->output, pMonitorRule->scale);
pMonitor->scale = pMonitorRule->scale;
+ pMonitor->vecPosition = pMonitorRule->offset;
+
// loop over modes and choose an appropriate one.
if (!wl_list_empty(&pMonitor->output->modes)) {
wlr_output_mode* mode;