mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 00:29:49 +01:00
guard onDisconnect
This commit is contained in:
parent
996e5a9e69
commit
8dd88d901d
1 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue