diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2022-12-05 17:05:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-05 17:05:15 +0000 |
| commit | 66fb0830032572c9729278b7e15525cb41bbf59e (patch) | |
| tree | 8560f87b39a193c01a3037ca00ef8f0af78e5a89 /src/Compositor.cpp | |
| parent | 20b91f58f8f8cc7cda7cca7e7683e4c5178f0479 (diff) | |
Implement window sharing with the hl toplevel export proto (#1179)
* implement window sharing
Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<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) |
