This commit is contained in:
Vaxry 2024-09-19 22:50:07 +01:00
parent 408a1462f7
commit ac084b3a9f

View file

@ -37,10 +37,10 @@ void CToplevelManager::activate() {
m_pManager = makeShared<CCZwlrForeignToplevelManagerV1>(wl_registry_bind((wl_registry*)g_pPortalManager->m_sWaylandConnection.registry->resource(), m_sWaylandConnection.name, m_pManager = makeShared<CCZwlrForeignToplevelManagerV1>(wl_registry_bind((wl_registry*)g_pPortalManager->m_sWaylandConnection.registry->resource(), m_sWaylandConnection.name,
&zwlr_foreign_toplevel_manager_v1_interface, m_sWaylandConnection.version)); &zwlr_foreign_toplevel_manager_v1_interface, m_sWaylandConnection.version));
m_pManager->setToplevel([this](CCZwlrForeignToplevelManagerV1* r, CCZwlrForeignToplevelHandleV1* newHandle) { m_pManager->setToplevel([this](CCZwlrForeignToplevelManagerV1* r, wl_proxy* newHandle) {
Debug::log(TRACE, "[toplevel] New toplevel at {}", (void*)newHandle); Debug::log(TRACE, "[toplevel] New toplevel at {}", (void*)newHandle);
m_vToplevels.emplace_back(std::make_unique<SToplevelHandle>(SP<CCZwlrForeignToplevelHandleV1>(newHandle))); m_vToplevels.emplace_back(std::make_unique<SToplevelHandle>(makeShared<CCZwlrForeignToplevelHandleV1>(newHandle)));
}); });
m_pManager->setFinished([this](CCZwlrForeignToplevelManagerV1* r) { m_vToplevels.clear(); }); m_pManager->setFinished([this](CCZwlrForeignToplevelManagerV1* r) { m_vToplevels.clear(); });