mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 11:05:58 +01:00
monitor: arrange monitors on connect and disconnect
This commit is contained in:
parent
6fbfeefc71
commit
52c0919621
1 changed files with 2 additions and 0 deletions
|
@ -36,6 +36,7 @@ CMonitor::~CMonitor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMonitor::onConnect(bool noRule) {
|
void CMonitor::onConnect(bool noRule) {
|
||||||
|
CScopeGuard x = {[]() { g_pCompositor->arrangeMonitors(); }};
|
||||||
|
|
||||||
if (output->supportsExplicit) {
|
if (output->supportsExplicit) {
|
||||||
inTimeline = CSyncTimeline::create(output->getBackend()->drmFD());
|
inTimeline = CSyncTimeline::create(output->getBackend()->drmFD());
|
||||||
|
@ -234,6 +235,7 @@ void CMonitor::onDisconnect(bool destroy) {
|
||||||
return;
|
return;
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"monitorremoved", szName});
|
g_pEventManager->postEvent(SHyprIPCEvent{"monitorremoved", szName});
|
||||||
EMIT_HOOK_EVENT("monitorRemoved", this);
|
EMIT_HOOK_EVENT("monitorRemoved", this);
|
||||||
|
g_pCompositor->arrangeMonitors();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
if (renderTimer) {
|
if (renderTimer) {
|
||||||
|
|
Loading…
Reference in a new issue