summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r--src/helpers/Monitor.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 44ac1dcf..c2f1ab5b 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -175,8 +175,13 @@ void CMonitor::onConnect(bool noRule) {
if (m_output->nonDesktop) {
Debug::log(LOG, "Not configuring non-desktop output");
- if (PROTO::lease)
- PROTO::lease->offer(m_self.lock());
+
+ for (auto& [name, lease] : PROTO::lease) {
+ if (!lease || m_output->getBackend() != lease->getBackend())
+ continue;
+
+ lease->offer(m_self.lock());
+ }
return;
}