summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-06-09 22:28:51 +0200
committerVaxry <vaxry@vaxry.net>2024-06-10 00:06:42 +0200
commit1423707dbefc0329e80895451903a77ab684f7ea (patch)
tree046e0592451a0470387a0ac649535d7263582e9e /src/helpers/Monitor.cpp
parent121c6ac3eae1601a1498e52a9be7030ebfed242c (diff)
output: remove wl_output globals for mirrored displays
ref #6387
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r--src/helpers/Monitor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 5962b73d..a30f1057 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -184,6 +184,9 @@ void CMonitor::onConnect(bool noRule) {
forceFullFrames = 3; // force 3 full frames to make sure there is no blinking due to double-buffering.
//
+ if (!activeMonitorRule.mirrorOf.empty())
+ setMirror(activeMonitorRule.mirrorOf);
+
g_pEventManager->postEvent(SHyprIPCEvent{"monitoradded", szName});
g_pEventManager->postEvent(SHyprIPCEvent{"monitoraddedv2", std::format("{},{},{}", ID, szName, szShortDescription)});
EMIT_HOOK_EVENT("monitorAdded", this);
@@ -517,6 +520,8 @@ void CMonitor::setMirror(const std::string& mirrorOf) {
g_pCompositor->sanityCheckWorkspaces();
}
+
+ events.modeChanged.emit();
}
float CMonitor::getDefaultScale() {