Implement window sharing with the hl toplevel export proto (#1179)

* implement window sharing

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
This commit is contained in:
Vaxry
2022-12-05 17:05:15 +00:00
committed by GitHub
parent 20b91f58f8
commit 66fb083003
19 changed files with 863 additions and 7 deletions

View File

@@ -326,6 +326,9 @@ void CCompositor::startCompositor() {
Debug::log(LOG, "Creating the XWaylandManager!");
g_pXWaylandManager = std::make_unique<CHyprXWaylandManager>();
Debug::log(LOG, "Creating the ProtocolManager!");
g_pProtocolManager = std::make_unique<CProtocolManager>();
Debug::log(LOG, "Creating the EventManager!");
g_pEventManager = std::make_unique<CEventManager>();
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)