core: move internal structures to monitor pointers (#8266)

This commit is contained in:
Vaxry
2024-10-27 18:45:38 +00:00
committed by GitHub
parent b6e226c320
commit 5d4b54b012
24 changed files with 226 additions and 215 deletions

View File

@@ -207,7 +207,7 @@ void CForeignToplevelWlrManager::onMap(PHLWINDOW pWindow) {
resource->sendToplevel(NEWHANDLE->resource.get());
NEWHANDLE->resource->sendAppId(pWindow->m_szClass.c_str());
NEWHANDLE->resource->sendTitle(pWindow->m_szTitle.c_str());
if (const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); PMONITOR)
if (const auto PMONITOR = pWindow->m_pMonitor.lock(); PMONITOR)
NEWHANDLE->sendMonitor(PMONITOR);
NEWHANDLE->sendState();
NEWHANDLE->resource->sendDone();
@@ -266,7 +266,7 @@ void CForeignToplevelWlrManager::onMoveMonitor(PHLWINDOW pWindow) {
if (!H || H->closed)
return;
const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
const auto PMONITOR = pWindow->m_pMonitor.lock();
if (!PMONITOR)
return;