mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 17:25:59 +01:00
hooks: add pre connected/disconnected monitor events (#8503)
This commit is contained in:
parent
b735295d2b
commit
9b03307653
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,7 @@ CMonitor::~CMonitor() {
|
|||
}
|
||||
|
||||
void CMonitor::onConnect(bool noRule) {
|
||||
EMIT_HOOK_EVENT("preMonitorAdded", self.lock());
|
||||
CScopeGuard x = {[]() { g_pCompositor->arrangeMonitors(); }};
|
||||
|
||||
if (output->supportsExplicit) {
|
||||
|
@ -238,6 +239,7 @@ void CMonitor::onConnect(bool noRule) {
|
|||
}
|
||||
|
||||
void CMonitor::onDisconnect(bool destroy) {
|
||||
EMIT_HOOK_EVENT("preMonitorRemoved", self.lock());
|
||||
CScopeGuard x = {[this]() {
|
||||
if (g_pCompositor->m_bIsShuttingDown)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue