diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2023-09-01 22:03:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-01 22:03:56 +0200 |
| commit | d9292800a27ca7de5cb8b258651e535a7880e9e6 (patch) | |
| tree | f02edbf66db79faf820c4e45a2f141f4aa745f44 /src/protocols/XDGOutput.cpp | |
| parent | 774a5bedf862e9956c1db42522f39a7b9327b32f (diff) | |
internal: Unsafe state reworks (#3114)
Diffstat (limited to 'src/protocols/XDGOutput.cpp')
| -rw-r--r-- | src/protocols/XDGOutput.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/protocols/XDGOutput.cpp b/src/protocols/XDGOutput.cpp index c1049bb5..4a7278d4 100644 --- a/src/protocols/XDGOutput.cpp +++ b/src/protocols/XDGOutput.cpp @@ -58,16 +58,11 @@ void CXDGOutputProtocol::bindManager(wl_client* client, void* data, uint32_t ver } CXDGOutputProtocol::CXDGOutputProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { - g_pHookSystem->hookDynamic("monitorLayoutChanged", [&](void* self, std::any param) { this->updateAllOutputs(); }); - g_pHookSystem->hookDynamic("configReloaded", [&](void* self, std::any param) { this->updateAllOutputs(); }); - g_pHookSystem->hookDynamic("monitorRemoved", [&](void* self, std::any param) { + g_pHookSystem->hookDynamic("monitorLayoutChanged", [this](void* self, std::any param) { this->updateAllOutputs(); }); + g_pHookSystem->hookDynamic("configReloaded", [this](void* self, std::any param) { this->updateAllOutputs(); }); + g_pHookSystem->hookDynamic("monitorRemoved", [this](void* self, std::any param) { const auto PMONITOR = std::any_cast<CMonitor*>(param); - std::erase_if(m_vXDGOutputs, [&](const auto& other) { - const bool R = other->monitor == PMONITOR; - if (R) - other->resource->markDefunct(); - return R; - }); + std::erase_if(m_vXDGOutputs, [&](const auto& other) { return other->monitor == PMONITOR; }); }); } |
