diff options
| author | davc0n <dconti.dev@gmail.com> | 2025-04-28 22:25:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-28 22:25:22 +0200 |
| commit | 21184404885cf61f7c10d2eb749478ef6b035dd2 (patch) | |
| tree | 38f1103d3e5f0188d149b7dd5d961ba64c2ed044 /src/managers/ANRManager.cpp | |
| parent | c505eb55ff967f2a0474e88a50803412ba550a61 (diff) | |
windows: refactor class member vars (#10168)
Diffstat (limited to 'src/managers/ANRManager.cpp')
| -rw-r--r-- | src/managers/ANRManager.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/managers/ANRManager.cpp b/src/managers/ANRManager.cpp index 48b9a6db..84261c45 100644 --- a/src/managers/ANRManager.cpp +++ b/src/managers/ANRManager.cpp @@ -51,7 +51,7 @@ void CANRManager::onTick() { PHLWINDOW firstWindow; int count = 0; for (const auto& w : g_pCompositor->m_windows) { - if (!w->m_bIsMapped) + if (!w->m_isMapped) continue; if (!data->fitsWindow(w)) @@ -67,10 +67,10 @@ void CANRManager::onTick() { if (data->missedResponses >= *PANRTHRESHOLD) { if (!data->isRunning() && !data->dialogSaidWait) { - data->runDialog("Application Not Responding", firstWindow->m_szTitle, firstWindow->m_szClass, data->getPid()); + data->runDialog("Application Not Responding", firstWindow->m_title, firstWindow->m_class, data->getPid()); for (const auto& w : g_pCompositor->m_windows) { - if (!w->m_bIsMapped) + if (!w->m_isMapped) continue; if (!data->fitsWindow(w)) @@ -133,10 +133,10 @@ bool CANRManager::isNotResponding(SP<CANRManager::SANRData> data) { SP<CANRManager::SANRData> CANRManager::dataFor(PHLWINDOW pWindow) { auto it = m_data.end(); - if (pWindow->m_pXWaylandSurface) - it = std::ranges::find_if(m_data, [&pWindow](const auto& data) { return data->xwaylandSurface && data->xwaylandSurface == pWindow->m_pXWaylandSurface; }); - else if (pWindow->m_pXDGSurface) - it = std::ranges::find_if(m_data, [&pWindow](const auto& data) { return data->xdgBase && data->xdgBase == pWindow->m_pXDGSurface->owner; }); + if (pWindow->m_xwaylandSurface) + it = std::ranges::find_if(m_data, [&pWindow](const auto& data) { return data->xwaylandSurface && data->xwaylandSurface == pWindow->m_xwaylandSurface; }); + else if (pWindow->m_xdgSurface) + it = std::ranges::find_if(m_data, [&pWindow](const auto& data) { return data->xdgBase && data->xdgBase == pWindow->m_xdgSurface->owner; }); return it == m_data.end() ? nullptr : *it; } @@ -150,8 +150,7 @@ SP<CANRManager::SANRData> CANRManager::dataFor(SP<CXWaylandSurface> pXwaylandSur return it == m_data.end() ? nullptr : *it; } -CANRManager::SANRData::SANRData(PHLWINDOW pWindow) : - xwaylandSurface(pWindow->m_pXWaylandSurface), xdgBase(pWindow->m_pXDGSurface ? pWindow->m_pXDGSurface->owner : WP<CXDGWMBase>{}) { +CANRManager::SANRData::SANRData(PHLWINDOW pWindow) : xwaylandSurface(pWindow->m_xwaylandSurface), xdgBase(pWindow->m_xdgSurface ? pWindow->m_xdgSurface->owner : WP<CXDGWMBase>{}) { ; } @@ -199,10 +198,10 @@ void CANRManager::SANRData::killDialog() { } bool CANRManager::SANRData::fitsWindow(PHLWINDOW pWindow) const { - if (pWindow->m_pXWaylandSurface) - return pWindow->m_pXWaylandSurface == xwaylandSurface; - else if (pWindow->m_pXDGSurface) - return pWindow->m_pXDGSurface->owner == xdgBase && xdgBase; + if (pWindow->m_xwaylandSurface) + return pWindow->m_xwaylandSurface == xwaylandSurface; + else if (pWindow->m_xdgSurface) + return pWindow->m_xdgSurface->owner == xdgBase && xdgBase; return false; } |
