From 66fb0830032572c9729278b7e15525cb41bbf59e Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:05:15 +0000 Subject: Implement window sharing with the hl toplevel export proto (#1179) * implement window sharing Co-authored-by: Mihai Fufezan --- src/Compositor.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 9c6df787..5cf43334 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -326,6 +326,9 @@ void CCompositor::startCompositor() { Debug::log(LOG, "Creating the XWaylandManager!"); g_pXWaylandManager = std::make_unique(); + Debug::log(LOG, "Creating the ProtocolManager!"); + g_pProtocolManager = std::make_unique(); + Debug::log(LOG, "Creating the EventManager!"); g_pEventManager = std::make_unique(); g_pEventManager->startThread(); @@ -909,6 +912,15 @@ CWindow* CCompositor::getWindowFromSurface(wlr_surface* pSurface) { return nullptr; } +CWindow* CCompositor::getWindowFromHandle(uint32_t handle) { + for (auto& w : m_vWindows) { + if ((uintptr_t)w.get() == (uintptr_t)handle) + return w.get(); + } + + return nullptr; +} + CWindow* CCompositor::getFullscreenWindowOnWorkspace(const int& ID) { for (auto& w : m_vWindows) { if (w->m_iWorkspaceID == ID && w->m_bIsFullscreen) -- cgit v1.2.3