summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-03 16:05:25 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-03 16:05:25 +0200
commit8dd88d901d3799ed9f2f4b3babcd0b2c1a7c5a24 (patch)
tree13c62c89f27ec728fa08348954cd413e7758c72e /src/helpers/Monitor.cpp
parent996e5a9e691feeceef495c784a67b54cb20f0cbf (diff)
guard onDisconnect
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r--src/helpers/Monitor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 9e7f76c4..b01ccb14 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -3,6 +3,9 @@
#include "../Compositor.hpp"
void CMonitor::onConnect(bool noRule) {
+ if (m_bEnabled)
+ return;
+
// get monitor rule that matches
SMonitorRule monitorRule = g_pConfigManager->getMonitorRuleFor(output->name);
@@ -109,6 +112,10 @@ void CMonitor::onConnect(bool noRule) {
}
void CMonitor::onDisconnect() {
+
+ if (!m_bEnabled)
+ return;
+
// Cleanup everything. Move windows back, snap cursor, shit.
CMonitor* BACKUPMON = nullptr;
for (auto& m : g_pCompositor->m_vMonitors) {