aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-10-05 14:41:44 +0100
committerVaxry <[email protected]>2024-10-05 14:41:44 +0100
commit52c09196219313aec2ec1d3d543669bff834d746 (patch)
treed6991a7811d3479616384648882471e6289eea08 /src/helpers
parent6fbfeefc7119ff86411b765aa26b4bffbaa825ec (diff)
downloadHyprland-52c09196219313aec2ec1d3d543669bff834d746.tar.gz
Hyprland-52c09196219313aec2ec1d3d543669bff834d746.zip
monitor: arrange monitors on connect and disconnect
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/Monitor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index f105ea66..c6cef41f 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -36,6 +36,7 @@ CMonitor::~CMonitor() {
}
void CMonitor::onConnect(bool noRule) {
+ CScopeGuard x = {[]() { g_pCompositor->arrangeMonitors(); }};
if (output->supportsExplicit) {
inTimeline = CSyncTimeline::create(output->getBackend()->drmFD());
@@ -234,6 +235,7 @@ void CMonitor::onDisconnect(bool destroy) {
return;
g_pEventManager->postEvent(SHyprIPCEvent{"monitorremoved", szName});
EMIT_HOOK_EVENT("monitorRemoved", this);
+ g_pCompositor->arrangeMonitors();
}};
if (renderTimer) {